RESOLVED WONTFIX 119721
Node::lazyReattach should avoid doing lots of work if already set to lazyAttach
https://bugs.webkit.org/show_bug.cgi?id=119721
Summary Node::lazyReattach should avoid doing lots of work if already set to lazyAttach
Ryosuke Niwa
Reported 2013-08-12 20:47:41 PDT
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
Ahmad Saleem
Comment 1 2022-09-30 18:03:40 PDT
lazyAttach is not something in Webkit. So marking this as "RESOLVED WONTFIX".
Note You need to log in before you can comment on or make changes to this bug.