Bug 119721
Summary: | Node::lazyReattach should avoid doing lots of work if already set to lazyAttach | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | ahmad.saleem792, dino, hyatt, kling, koivisto, simon.fraser |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
Consider merging https://chromium.googlesource.com/chromium/blink/+/56066be33d1372c11c3f2f97af0fa34a663f16fe
In r155380 I originally observed a 25-30% improvement in speed for
ShadowDOM/LargeDistributionWithLayout:Runs, but the final bug I fixed in that
patch before uploading turned that into a 30% performance regression. The reason
for this is that we now correctly lazyAttach all distributed nodes when
doing lazyAttach on an InsertionPoint while before we were incorrectly skipping this
work leading to bugs.
It turns out the biggest issue with the fix is that we now end up calling lazyReattach
repeatedly on the same nodes as we go through the distribution process in the
ContentDistributor. To avoid this we can make Node::lazyReattach smart enough
to skip doing the detach() and lazyAttach() if the node is already set to lazyAttach.
This restores the 25-30% improvement on ShadowDOM/LargeDistributionWithLayout:Runs
and adds a 3-6% improvement on all other ShadowDOM/* perf tests. It should also improve
our performance when doing large multi level reprojections since we'll no longer do the
detach/lazyAttach work for each node as we reproject them down through the tree.
Unfortunately when researching this I also realized that the LargeDistributionWithLayout
perf test doesn't actually perf test layout time at all. I'll deal with the perf test
itself in a follow up patch.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
lazyAttach is not something in Webkit. So marking this as "RESOLVED WONTFIX".