mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibWeb: Avoid O(n^2) traversal in play-or-cancel-animations logic
The play_or_cancel_animations_after_display_property_change() helper was being called by Node::inserted() and Node::removed_from() and then recursing into the shadow-including subtree. This had quadratic complexity since inserted() and removed_from() are themselves already invoked recursively for everything in the shadow-including subtree. Only one caller of this API actually needed the recursive behavior, so this patch moves that responsibility to the caller and puts the logic in style recomputation instead. 1.02x speedup on Speedometer's TodoMVC-jQuery.
This commit is contained in:
parent
1a9e78a774
commit
096eed35cc
Notes:
github-actions[bot]
2025-05-11 18:23:14 +00:00
Author: https://github.com/awesomekling
Commit: 096eed35cc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4693
4 changed files with 44 additions and 44 deletions
|
@ -499,6 +499,8 @@ protected:
|
|||
|
||||
CustomElementState custom_element_state() const { return m_custom_element_state; }
|
||||
|
||||
void play_or_cancel_animations_after_display_property_change();
|
||||
|
||||
private:
|
||||
FlyString make_html_uppercased_qualified_name() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue