mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibWeb: Cache the qualified layer name in CSSRule
This makes cascade layer filtering take <2% of CPU time when loading https://vercel.com instead of 30%.
This commit is contained in:
parent
95bd0602ba
commit
44e4ea3d7a
Notes:
github-actions[bot]
2024-09-07 11:24:51 +00:00
Author: https://github.com/awesomekling
Commit: 44e4ea3d7a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1312
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 33 additions and 31 deletions
|
@ -58,10 +58,12 @@ protected:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
String parent_layer_internal_qualified_name() const;
|
||||
FlyString const& parent_layer_internal_qualified_name() const;
|
||||
|
||||
JS::GCPtr<CSSRule> m_parent_rule;
|
||||
JS::GCPtr<CSSStyleSheet> m_parent_style_sheet;
|
||||
|
||||
mutable Optional<FlyString> m_cached_layer_name;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue