rebuildLayoutTree performance regression (nextTextSibling)
Reported by
r...@opera.com,
Oct 26 2016
|
||||
Issue descriptionWhile investigating issue 659535 , I was not able to get back to the performance for PerformanceTests/DOM/select-single-remove.html as before my offending change. Looking at callgrind output, the recalcStyle behavior was different and a lot of time is currently spent in Node::nextTextSibling. I found that the reason was crrev.com/651c1399 Now, it wasn't very noticeable in the graphs since the issue I introduced covered it, but reverting my change only brought the perf graph half the way up again. Reverting crrev.com/651c1399 made everything fine. So without my breakage, crrev.com/651c1399 would've caused nearly a 50% decrease in performance for the test in question.
,
Oct 27 2016
Sorry I am bad at copy pasting apparently. RecalcData doesn't need to be ref counted. The map will be: HeapHashMap<Member<Element>, RecalcData> m_recalcData
,
Oct 27 2016
,
Oct 28 2016
,
Oct 31 2016
My anticipation is now reflected in the graphs: https://chromeperf.appspot.com/group_report?bug_id=660181
,
Nov 14 2016
,
Nov 16 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d1fc66d0e6f64e38bcff450b54f908b354eff2aa commit d1fc66d0e6f64e38bcff450b54f908b354eff2aa Author: bugsnash <bugsnash@chromium.org> Date: Wed Nov 16 00:45:22 2016 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 Review-Url: https://codereview.chromium.org/2476163002 Cr-Commit-Position: refs/heads/master@{#432324} [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/BUILD.gn [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/ContainerNode.cpp [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/Document.cpp [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/Document.h [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/Element.cpp [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/Element.h [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/Node.cpp [modify] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/Node.h [add] https://crrev.com/d1fc66d0e6f64e38bcff450b54f908b354eff2aa/third_party/WebKit/Source/core/dom/StyleReattachData.h
,
Nov 16 2016
,
Dec 4 2016
Issue 659574 has been merged into this issue. |
||||
►
Sign in to add a comment |
||||
Comment 1 by nainar@chromium.org
, Oct 27 2016