Bug 130357

Summary: Add one-deep cache to opaque roots hashset.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Severity: Normal CC: barraclough, commit-queue, darin, mhahnenberg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch idea none

Description Andreas Kling 2014-03-17 13:56:21 PDT
For WebCore JS wrappers, we're almost always root()'ed at the Document, which means that we're querying the SlotVisitor's opaque roots set for the same Document* over and over.
On DoYouEvenBench, we're spending ~1.5% of time in JSNodeOwner::isReachableFromOpaqueRoots(). This optimization attempts to alleviate some of that.
Comment 1 Andreas Kling 2014-03-17 13:58:17 PDT
Created attachment 226958 [details]
Patch idea
Comment 2 Mark Hahnenberg 2014-03-17 16:12:13 PDT
Comment on attachment 226958 [details]
Patch idea

Comment 3 WebKit Commit Bot 2014-03-17 20:28:47 PDT
Comment on attachment 226958 [details]
Patch idea

Clearing flags on attachment: 226958

Committed r165796: <http://trac.webkit.org/changeset/165796>
Comment 4 WebKit Commit Bot 2014-03-17 20:28:50 PDT
All reviewed patches have been landed.  Closing bug.