mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
Eliminate O(n) tree-order sorted insert on every add() by simply appending elements and deferring order resolution to lookup time. Cache the first-in-tree-order element in get() so repeated getElementById() calls avoid repeated subtree traversal. Improves performance on YouTube where add() was hot in profiles while scrolling through comments.
2.4 KiB
2.4 KiB