Bug 96315

Summary: Reduce the number of treeScope queries when matching rules.
Product: WebKit Reporter: Dimitri Glazkov (Google) <dglazkov>
Component: New BugsAssignee: Dimitri Glazkov (Google) <dglazkov>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, eric, kling, koivisto, macpherson, menard, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 95664    
Attachments:
Description Flags
Patch none

Dimitri Glazkov (Google)
Reported 2012-09-10 13:52:58 PDT
Reduce the number of treeScope queries when matching rules.
Attachments
Patch (2.20 KB, patch)
2012-09-10 13:57 PDT, Dimitri Glazkov (Google)
no flags
Dimitri Glazkov (Google)
Comment 1 2012-09-10 13:57:03 PDT
Eric Seidel (no email)
Comment 2 2012-09-10 14:27:29 PDT
Comment on attachment 163202 [details] Patch I assume this is a perf change. :) Do we have any benchmarks which notice this? It looks fine though.
Dimitri Glazkov (Google)
Comment 3 2012-09-10 14:30:11 PDT
I am still trying to get the benchmark set up running on my machine, but I'll be watching the perf results when this lands. Do you think it's worth promoting treeScope to a member of StyleResolver that's initialized once for styleForElement?
Eric Seidel (no email)
Comment 4 2012-09-10 14:34:03 PDT
The treeScope is part of the per-element state, which eventually needs to be ripped out of StyleResolver into a separate object. :) But yes, it could be a member on that state, or on StyleResolver directly until then if you have benchmarks to show that it's important.
Dimitri Glazkov (Google)
Comment 5 2012-09-10 14:35:11 PDT
(In reply to comment #4) > The treeScope is part of the per-element state, which eventually needs to be ripped out of StyleResolver into a separate object. :) Did you not have a bug on this somewhere?
Eric Seidel (no email)
Comment 6 2012-09-10 14:47:48 PDT
https://bugs.webkit.org/show_bug.cgi?id=89879 is a meta bug I created. I didn't create on specifically about splitting out the per-element state.
WebKit Review Bot
Comment 7 2012-09-10 16:26:13 PDT
Comment on attachment 163202 [details] Patch Clearing flags on attachment: 163202 Committed r128128: <http://trac.webkit.org/changeset/128128>
WebKit Review Bot
Comment 8 2012-09-10 16:26:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.