Closed
Bug 1443814
Opened 7 years ago
Closed 7 years ago
Consider changing the order of selector-matching for invalidation to be the same as normal matching.
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
See bug 1420423 comment 92 and more.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8956844 [details]
Bug 1443814: Change the we match selectors on invalidation to match normal order.
https://reviewboard.mozilla.org/r/225800/#review232132
::: commit-message-4db6f:3
(Diff revision 2)
> +This just needs to toggle that flag for profiling. If we want to land it I'll
> +remove all the dead code out of there.
> +
Nit: Remove this part of the commit message.
::: servo/components/selectors/matching.rs:253
(Diff revision 2)
> shared: context,
> matches_hover_and_active_quirk: MatchesHoverAndActiveQuirk::No,
> };
>
> + let start_offset = from_offset;
> for component in selector.iter_raw_parse_order_from(from_offset) {
Add a comment here that we're first iterating over the selector to find the next combinator, so that we can match in the same order that regular selector matching does (which we assume is usually faster).
Attachment #8956844 -
Flags: review?(bobbyholley) → review+
Comment 4•7 years ago
|
||
FTR: This change speeds up Servo_InvalidateStyleForDocStateChanges by a factor of two, and thus improves Tpaint by 5ms (~2%) in my local testing. This is a significant win, and Emilio and I agree the change is pretty safe, since it just causes us to do invalidation matching in the same order as regular matching (which is the fast order), and since the code is well-tested. The change is neutral on StyleBench, which is the only other thing in our test suite (to my knowledge) that is invalidation-bound.
As such, I've asked emilio to land this for 60 to further improve the experience under stylo-chrome.
Assignee | ||
Comment 5•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•