Bug 9552

Summary: script debugger should only attach to JavaScriptCore when there are listeners
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebKit Misc.Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Implements the lazy attach ggaren: review+

Timothy Hatcher
Reported 2006-06-23 00:05:44 PDT
Right now the script debuggers always attach when you have the WebScriptDebuggerEnabled default set. This does not mean we have any registered listeners. When using a build that has these debuggers attached there is around a 50% performance impact on the JS 24Fun test. We need to lazily attach the debuggers to all frames when the first listener is added. Once all the listeners are detached we can then remove the listeners, regaining peek performance.
Attachments
Implements the lazy attach (12.88 KB, patch)
2006-06-23 00:10 PDT, Timothy Hatcher
ggaren: review+
Timothy Hatcher
Comment 1 2006-06-23 00:10:28 PDT
Created attachment 8976 [details] Implements the lazy attach
Timothy Hatcher
Comment 2 2006-06-23 00:11:42 PDT
"Once all the listeners are removed we can then detach the debuggers, regaining peek performance."
Geoffrey Garen
Comment 3 2006-06-23 11:59:03 PDT
Comment on attachment 8976 [details] Implements the lazy attach I would make these changes: - "Attaches a script debugger to all frames for the receiver." + "Attaches a script debugger to all frames belonging to the receiver." - @abstract Detaches any script debuggers from all frames for the receiver. + @abstract Detaches all script debuggers from all frames belonging to the receiver. r=me
Timothy Hatcher
Comment 4 2006-06-23 12:59:15 PDT
Landed in r14990.
Note You need to log in before you can comment on or make changes to this bug.