DescriptionOnly process each StyleSheetContents once when collecting features during style resolution
Now that Blink shares StyleSheetContents between <style> elements with
identical textContent, it's wasteful to add features from every
CSSStyleSheet instance.
Instead, keep a HashSet of visited StyleSheetContents in
ScopedStyleTree::collectFeaturesTo() and consult it when adding each
stylesheet's features in ScopedStyleResolve::collectFeaturesTo().
The included test goes from ~390ms on my Z620 without to patch
down to ~80ms with it.
BUG=351145
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169044
Patch Set 1 #Patch Set 2 : Only hash shared stylesheets #
Messages
Total messages: 7 (0 generated)
|