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

Issue 202223002: Avoid copying the CachedUAStyle when possible (Closed)

Created:
6 years, 9 months ago by esprehn
Modified:
6 years, 9 months ago
Reviewers:
eseidel, ojan
CC:
blink-reviews, zoltan1, dsinclair, bemjb+rendering_chromium.org, eae+blinkwatch, ed+blinkwatch_opera.com, leviw+renderwatch, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, pdr., rune+blink, rwlbuis
Visibility:
Public.

Description

Avoid copying the CachedUAStyle when possible 1.6% of the overall profile, and 2% of the recalcStyle, in the PeaceKeeper benchmark is spent inside cacheUserAgentBorderAndBackground() because even though there is an appearance guard on the constructor, we still run constructors and destructors for all the members which aren't free since lots of them have a lot of fields to initialize (ex. FillLayers and BorderData). This patch moves the check from the constructor of CachedUAStyle into cacheUserAgentBorderAndBackground() so that we can skip all the initialization for the common case where the element has no appearance. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169408

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -7 lines) Patch
M Source/core/css/resolver/StyleResolverState.h View 1 chunk +8 lines, -1 line 1 comment Download
M Source/core/rendering/style/CachedUAStyle.h View 1 chunk +2 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
esprehn
6 years, 9 months ago (2014-03-17 17:39:36 UTC) #1
eseidel
lgtm
6 years, 9 months ago (2014-03-17 17:41:18 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202223002/1
6 years, 9 months ago (2014-03-17 17:41:36 UTC) #3
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 18:03:26 UTC) #4
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-17 18:03:26 UTC) #5
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-17 18:05:31 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202223002/1
6 years, 9 months ago (2014-03-17 18:05:35 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 18:06:17 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-17 18:06:18 UTC) #9
ojan
lgtm https://codereview.chromium.org/202223002/diff/1/Source/core/css/resolver/StyleResolverState.h File Source/core/css/resolver/StyleResolverState.h (right): https://codereview.chromium.org/202223002/diff/1/Source/core/css/resolver/StyleResolverState.h#newcode97 Source/core/css/resolver/StyleResolverState.h:97: void cacheUserAgentBorderAndBackground() Nit: this is now kind of ...
6 years, 9 months ago (2014-03-17 18:59:12 UTC) #10
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-17 23:52:23 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202223002/1
6 years, 9 months ago (2014-03-17 23:52:34 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 03:23:17 UTC) #13
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 9 months ago (2014-03-18 03:23:17 UTC) #14
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-18 03:32:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202223002/1
6 years, 9 months ago (2014-03-18 03:33:29 UTC) #16
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 03:36:39 UTC) #17
Message was sent while issue was closed.
Change committed as 169408

Powered by Google App Engine
This is Rietveld 408576698