NEW 101540
Attached vs detached tree performance
https://bugs.webkit.org/show_bug.cgi?id=101540
Summary Attached vs detached tree performance
Philip Rogers
Reported 2012-11-07 19:40:34 PST
Created attachment 172919 [details] Testcase showing performance badness In the attached repro, appending a bunch of nodes to a detached element is much slower than appending a bunch of nodes to an attached element. I did a quick trace of this and it looks like the time is spent in walking the render tree (ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint), which doesn't seem right. We may have some easy performance wins here. I've attached a screenshot of the trace comparison as well (left: not detached, right: detached). Original bug: http://code.google.com/p/chromium/issues/detail?id=155907
Attachments
Testcase showing performance badness (1.40 KB, text/html)
2012-11-07 19:40 PST, Philip Rogers
no flags
Profile (1.15 MB, image/png)
2012-11-07 19:41 PST, Philip Rogers
no flags
Philip Rogers
Comment 1 2012-11-07 19:41:00 PST
Philip Rogers
Comment 2 2012-11-07 19:42:23 PST
Additional details from the original bug: "In particular, I would have expected the non-detach mode to be much slower if I did anything to invalidate layout, and I would have expected the slowdown to be in layout. As expected, both approaches spend the same amount of time in JS as well as in layout. Unexpectedly, adding the nodes while the elements are attached causes one very long style recalc before layout and paint."
Note You need to log in before you can comment on or make changes to this bug.