Bug 17770 - JavaScript execution is dramatically slower while Drosera is attached
Summary: JavaScript execution is dramatically slower while Drosera is attached
Status: CLOSED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 17554 (view as bug list)
Depends on:
Blocks: 10688 17778
  Show dependency treegraph
 
Reported: 2008-03-11 09:25 PDT by Adam Roben (:aroben)
Modified: 2008-05-17 09:56 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2008-03-11 09:25:02 PDT
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.
Comment 1 Adam Roben (:aroben) 2008-03-11 09:25:59 PDT
<rdar://problem/5792378>
Comment 2 Adam Roben (:aroben) 2008-03-12 23:27:37 PDT
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).
Comment 3 Adam Roben (:aroben) 2008-03-13 22:39:54 PDT
*** Bug 17554 has been marked as a duplicate of this bug. ***
Comment 4 Adam Roben (:aroben) 2008-04-17 10:52:33 PDT
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
Comment 5 Adam Roben (:aroben) 2008-04-17 11:19:35 PDT
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
Comment 6 Adam Roben (:aroben) 2008-04-18 10:50:31 PDT
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.
Comment 7 Kevin McCullough 2008-05-16 14:04:55 PDT
Drosera is going away and JS debugging is now happening in the WebInspector.
Comment 8 Timothy Hatcher 2008-05-17 09:56:09 PDT
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.