mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
447ecc2155
Currently, each time parent_index() is invoked, two depth-first searches are incurred to find the node's parent and grandparent. This becomes particularly expensive, for example, when trying to scroll through a large <ul> list. Instead, upon creation, traverse the DOM JSON and create a map of child nodes to their parent. Then those two lookups become hash map lookups rather than a DFS traversal. |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |