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
Created attachment 172920 [details] Profile
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."