Bug 17770
Summary: | JavaScript execution is dramatically slower while Drosera is attached | ||
---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | CLOSED WONTFIX | ||
Severity: | Normal | CC: | bfattori |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 10688, 17778 |
Adam Roben (:aroben)
JavaScript execution is dramatically slower while Drosera is attached.
It's likely that much of this slowness is due to WebKit making a cross-process call to Drosera for every line of JavaScript executed, even if Drosera has no breakpoints set.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Adam Roben (:aroben)
<rdar://problem/5792378>
Adam Roben (:aroben)
One possible way we could solve this would be for WebKit to be aware of Drosera's breakpoints and only make cross-process calls when a breakpoint is hit or Drosera requests that we step.
Another possible way to solve this would be to move debugging to be in-process (as covered by bug 17134).
Adam Roben (:aroben)
*** Bug 17554 has been marked as a duplicate of this bug. ***
Adam Roben (:aroben)
While a lot of the slowness surely comes from the cross-process calls, some of it definitely comes from WebCore/JSC's debugger infrastructure.
Adding a single no-op JavaScriptDebugListener to WebCore's JavaScriptDebugServer caused SunSpider to be 2.42x as slow. Here are the actual results:
Without a JavaScriptDebugListener:
http://webkit.decenturl.com/sunspider-without-javascriptdebuglis
With a JavaScriptDebugListener:
http://webkit.decenturl.com/sunspider-with-a-javascriptdebuglist
Adam Roben (:aroben)
I just tried this with Firefox 2 and Firebug. The performance was not significantly different when Firebug was disabled vs. enabled.
Firebug disabled:
http://webkit.decenturl.com/sunspider-without-firebug
Firebug enabled:
http://webkit.decenturl.com/sunspider-with-firebug
Adam Roben (:aroben)
Strangely, changing JavaScriptDebugListener to use const KJS::UString& instead of const String& did not improve performance on SunSpider at all, even though it should reduce the number of strings allocated.
Kevin McCullough
Drosera is going away and JS debugging is now happening in the WebInspector.
Timothy Hatcher
Closing since Drosera has been replaced by the new Web Inspector debugger. Moving to the New Bugs component so the Drosera component can be closed and removed.