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

Issue 102273004: Defer pushing the parent stack in recalcStyle until StyleResolver::styleForElement() (Closed)

Created:
7 years ago by esprehn
Modified:
6 years, 9 months ago
Reviewers:
eseidel, ojan
CC:
blink-reviews, eae+blinkwatch, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears
Visibility:
Public.

Description

Defer pushing the parent stack in recalcStyle until StyleResolver::styleForElement() This means that when style sharing we don't always have to push the bloom filter and parent stack and also avoids pushing the stack for elements that only have text node children. Similarly this improves the performance of things like editing that will insert a text node and immediately call recalcStyle to cause it to attach by avoiding the parent stack since it's not needed. I had tried to make the StyleResolverParentPusher smarter to push implicitly in https://codereview.chromium.org/68253003 but it was reverted in https://codereview.chromium.org/59883011 because it caused a perf regression by making us push the filter for elements that only had text node children in recalcStyle. In fixing that I realized that we push inside ::attach() even if there are only text children and could get a similar perf improvement by avoiding pushing in those cases. R=ojan@chromium.org,eseidel@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170168

Patch Set 1 #

Patch Set 2 : no-find-copies #

Total comments: 1

Patch Set 3 : Make recalcStyle and attach have the same order #

Patch Set 4 : pushScopes -> ensureParentStackIsPushed #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -59 lines) Patch
M Source/core/core.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
A Source/core/css/resolver/StyleResolverParentScope.h View 1 2 3 4 5 1 chunk +65 lines, -0 lines 0 comments Download
A + Source/core/css/resolver/StyleResolverParentScope.cpp View 1 2 3 4 5 1 chunk +4 lines, -7 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 6 chunks +10 lines, -52 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
esprehn
7 years ago (2013-12-09 18:12:22 UTC) #1
eseidel
lgtm This is much cleaner, thanks. https://codereview.chromium.org/102273004/diff/20001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/102273004/diff/20001/Source/core/css/resolver/StyleResolver.cpp#newcode686 Source/core/css/resolver/StyleResolver.cpp:686: StyleResolverParentScope::pushScopes(); This is ...
7 years ago (2013-12-09 18:18:36 UTC) #2
esprehn
On 2013/12/09 18:18:36, eseidel wrote: > ... > https://codereview.chromium.org/102273004/diff/20001/Source/core/css/resolver/StyleResolver.cpp#newcode686 > Source/core/css/resolver/StyleResolver.cpp:686: > StyleResolverParentScope::pushScopes(); > This ...
7 years ago (2013-12-09 18:22:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/102273004/60001
7 years ago (2013-12-09 18:22:26 UTC) #4
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=14951
7 years ago (2013-12-09 19:37:24 UTC) #5
esprehn
On 2013/12/09 19:37:24, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years ago (2013-12-09 19:53:15 UTC) #6
esprehn
On 2013/12/09 at 19:53:15, esprehn wrote: > On 2013/12/09 19:37:24, I haz the power (commit-bot) ...
6 years, 9 months ago (2014-03-27 12:01:56 UTC) #7
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-27 12:02:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/102273004/100001
6 years, 9 months ago (2014-03-27 12:02:31 UTC) #9
commit-bot: I haz the power
6 years, 9 months ago (2014-03-27 12:03:38 UTC) #10
Message was sent while issue was closed.
Change committed as 170168

Powered by Google App Engine
This is Rietveld 408576698