Consider schedule invalidation sets on root element for ruleset invalidation
Reported by
r...@opera.com,
Jan 6 2017
|
||||||||||
Issue descriptionWhen we do ruleset invalidation for active stylesheet update, we currently schedule invalidation sets per element based on its attributes. Scheduling all sets on the root element might be more efficient. We avoid a pass over the dom tree and have fewer pending invalidation sets.
,
Jan 9 2017
I've looked at ruleset invalidations for Facebook. The problem with scheduling all invalidation sets on the root element means we'll often have rules which are universal in the rightmost compound. These selectors show up in my printf for navigating my Facebook profile: ForceSubtree: ._5v3q ._58jw :first-child ForceSubtree: ._5v3q ._58jw :last-child ForceSubtree: ._53r8 > :nth-child(1n) ForceSubtree: ._2m3o :first-child ForceSubtree: ._2m3p._5a5j :first-child ForceSubtree: ._2m3p._5a5l :first-child ForceSubtree: ._2m3p._5a5k :first-child That means for Facebook, and I suspect many (most?) other pages, would end up with always doing full document recalcs.
,
Jan 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e397619af9370372f49a4d1281d1f19b013f501 commit 6e397619af9370372f49a4d1281d1f19b013f501 Author: rune <rune@opera.com> Date: Mon Jan 09 20:42:15 2017 Added trace for scheduleInvalidationsForRuleSets. R=esprehn@chromium.org BUG=678849 Review-Url: https://codereview.chromium.org/2620673002 Cr-Commit-Position: refs/heads/master@{#442332} [modify] https://crrev.com/6e397619af9370372f49a4d1281d1f19b013f501/third_party/WebKit/Source/core/dom/StyleEngine.cpp
,
Jan 10 2017
Interesting, I guess lets see how expensive that tree walk is on typical content. Solutions would be: - Simple: Schedule subtree invalidation sets for the left most selector. - Hard: Teach the invalidator about two pass selectors. So we first match the left most component, and upon matching it, schedule an invalidation set for the right most component.
,
Feb 13 2017
,
Aug 2 2017
,
Oct 19 2017
The assigned owner "rune@opera.com" is not able to receive e-mails, please re-triage. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 19 2017
,
Nov 8 2017
,
Nov 30 2017
,
Dec 6 2017
,
Dec 6
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 10
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by timloh@chromium.org
, Jan 6 2017