It was very O(n^2).
Created attachment 437411 [details] patch
Created attachment 437426 [details] patch
Comment on attachment 437426 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=437426&action=review > LayoutTests/fast/shadow-dom/host-child-append-performance.html:11 > +for (i = 0; i < 10000; ++i) > + host.appendChild(document.createElement("div")); Wouldn't this test start passing on a very fast machine even if this got broken or start failing on a very slow machine without any regression? I guess there is no way around it.
In theory, but this is really far from passing, especially on debug build.
(without the fix that is)
Committed r282073 (241373@main): <https://commits.webkit.org/241373@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 437426 [details].
<rdar://problem/82808890>