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

Issue 2476163002: Fixed perf regression by removing tree traversal for text sibling. (Closed)

Created:
4 years, 1 month ago by Bugs Nash
Modified:
4 years, 1 month ago
Reviewers:
nainar, esprehn, rune
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed perf regression by removing tree traversal for text sibling. Changed contents of HeapHashMap on Document to store a new struct StyleRecalcData containing both the original ComputedStyle and the next Text sibling. Deleted Node::nextTextSibling method that traverses the tree to find the next text sibling, replaced usage of this method with access to the Text node from the StyleRecalcData. Patch yields a 79.21% performance improvement to blink_perf.dom:select-single-remove benchmark on mac-10-10 bot: http://storage.googleapis.com/chromium-telemetry/html-results/results-2016-11-06_17-33-01 BUG=659647 Committed: https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa Cr-Commit-Position: refs/heads/master@{#432324}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed reviewer comments #

Patch Set 3 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -34 lines) Patch
M third_party/WebKit/Source/core/dom/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 5 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 4 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 6 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
A third_party/WebKit/Source/core/dom/StyleReattachData.h View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (20 generated)
Bugs Nash
4 years, 1 month ago (2016-11-06 22:55:18 UTC) #3
nainar
LGTM! \o/ Thanks for getting rid of the regression!
4 years, 1 month ago (2016-11-06 23:00:38 UTC) #5
Bugs Nash
4 years, 1 month ago (2016-11-07 03:33:33 UTC) #10
rune
I realize the documentation I wrote in core/dom/WhitespaceLayoutObjects.md is already getting out-of-date, but I don't ...
4 years, 1 month ago (2016-11-07 09:43:19 UTC) #13
esprehn
https://codereview.chromium.org/2476163002/diff/1/third_party/WebKit/Source/core/dom/Document.h File third_party/WebKit/Source/core/dom/Document.h (right): https://codereview.chromium.org/2476163002/diff/1/third_party/WebKit/Source/core/dom/Document.h#newcode1465 third_party/WebKit/Source/core/dom/Document.h:1465: HeapHashMap<Member<Element>, Member<StyleRecalcData>> m_styleRecalcDataMap; HeapHashMap<Member<Element>, StyleRecalcData> that way we avoid ...
4 years, 1 month ago (2016-11-07 22:26:26 UTC) #14
Bugs Nash
Have addressed reviews. Rune note that I needed to include the new StyleRecalcData file instead ...
4 years, 1 month ago (2016-11-14 23:31:06 UTC) #17
rune
lgtm
4 years, 1 month ago (2016-11-15 09:48:35 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2476163002/40001
4 years, 1 month ago (2016-11-15 23:29:20 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-16 00:45:52 UTC) #28
commit-bot: I haz the power
4 years, 1 month ago (2016-11-16 00:48:42 UTC) #30
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa
Cr-Commit-Position: refs/heads/master@{#432324}

Powered by Google App Engine
This is Rietveld 408576698