Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 195903002: Only process each StyleSheetContents once when collecting features during style resolution (Closed)

Created:
6 years, 9 months ago by adamk
Modified:
6 years, 9 months ago
Reviewers:
esprehn, ojan
CC:
blink-reviews, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, ojan, ykyyip, tasak
Visibility:
Public.

Description

Only 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -11 lines) Patch
A + PerformanceTests/ShadowDOM/shadow-style-share-attr-selectors.html View 2 chunks +10 lines, -6 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 1 chunk +6 lines, -3 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleTree.cpp View 1 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
adamk
6 years, 9 months ago (2014-03-11 22:02:57 UTC) #1
ojan
lgtm
6 years, 9 months ago (2014-03-12 18:03:09 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/195903002/20001
6 years, 9 months ago (2014-03-12 18:03:11 UTC) #3
esprehn
lgtm
6 years, 9 months ago (2014-03-12 18:11:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/195903002/20001
6 years, 9 months ago (2014-03-12 18:29:50 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/195903002/20001
6 years, 9 months ago (2014-03-12 18:37:32 UTC) #6
commit-bot: I haz the power
6 years, 9 months ago (2014-03-12 18:39:41 UTC) #7
Message was sent while issue was closed.
Change committed as 169044

Powered by Google App Engine
This is Rietveld 408576698