mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
|
@ -42,10 +42,9 @@ String CSSLayerStatementRule::serialized() const
|
|||
|
||||
Vector<FlyString> CSSLayerStatementRule::internal_qualified_name_list(Badge<StyleComputer>) const
|
||||
{
|
||||
// TODO: Cache these?
|
||||
Vector<FlyString> qualified_layer_names;
|
||||
|
||||
auto qualified_parent_layer_name = parent_layer_internal_qualified_name();
|
||||
auto const& qualified_parent_layer_name = parent_layer_internal_qualified_name();
|
||||
if (qualified_parent_layer_name.is_empty())
|
||||
return m_name_list;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue