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

Issue 1858553002: Refactor StyleVariableData to fallback on root map for performance reasons. (Closed)

Created:
4 years, 8 months ago by shans
Modified:
4 years, 8 months ago
Reviewers:
Timothy Loh
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, rwlbuis, sergeyv+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor StyleVariableData to fallback on root map. A StyleVariableData object is a 'root' when it is constructed empty rather than as a copy of another StyleVariableData. This change points all derived StyleVariableData objects back to their root, and delegates lookups rather than copying variable values. This is a performance motivated change. Adding custom properties to a node used to require that the inherited properties object from the parent node be copied. This coupled with a standard practice of creating several hundred custom properties on the root node resulted in expensive style recalculation (e.g. more than 50ms on desktop to create 1000 child custom properties). With this change incorporated, root node custom properties always form a fallback dictionary that is never copied, so creating 1000 child custom properties costs approximately the same as creating none. BUG=592770 Committed: https://crrev.com/816a8ffc2122e85bd9de4f5e0a30378170c7ca99 Cr-Commit-Position: refs/heads/master@{#386004}

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -13 lines) Patch
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleVariableData.h View 1 2 1 chunk +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleVariableData.cpp View 1 2 2 chunks +42 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
shans
4 years, 8 months ago (2016-04-04 08:13:57 UTC) #2
Timothy Loh
The patch title and description need to make it more clear that this is an ...
4 years, 8 months ago (2016-04-05 03:13:37 UTC) #3
shans
https://codereview.chromium.org/1858553002/diff/1/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp File third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp (right): https://codereview.chromium.org/1858553002/diff/1/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp#newcode32 third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp:32: #include "core/css/CSSVariableData.h" On 2016/04/05 at 03:13:37, Timothy Loh wrote: ...
4 years, 8 months ago (2016-04-08 00:55:49 UTC) #4
Timothy Loh
lgtm https://codereview.chromium.org/1858553002/diff/1/third_party/WebKit/Source/core/style/StyleVariableData.h File third_party/WebKit/Source/core/style/StyleVariableData.h (right): https://codereview.chromium.org/1858553002/diff/1/third_party/WebKit/Source/core/style/StyleVariableData.h#newcode44 third_party/WebKit/Source/core/style/StyleVariableData.h:44: StyleVariableData() On 2016/04/08 00:55:49, shans wrote: > On ...
4 years, 8 months ago (2016-04-08 03:42:06 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1858553002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1858553002/20001
4 years, 8 months ago (2016-04-08 04:20:54 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/16087) ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-08 04:22:49 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1858553002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1858553002/40001
4 years, 8 months ago (2016-04-08 05:07:28 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-08 06:11:19 UTC) #14
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 06:12:59 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/816a8ffc2122e85bd9de4f5e0a30378170c7ca99
Cr-Commit-Position: refs/heads/master@{#386004}

Powered by Google App Engine
This is Rietveld 408576698