ladybird/Libraries/LibWeb/HTML/CustomElements
Andreas Kling 786e93b6c7 LibWeb: Avoid unnecessary GC::Root copies in find_if lambdas
The find_if lambdas in CustomElementRegistry and TraversableNavigable
were taking GC::Root parameters, causing implicit conversion from
GC::Ref (or copying of GC::Root) for each element visited. Each
GC::Root creation/destruction allocates and frees a RootImpl, making
linear scans over these vectors far more expensive than necessary.

Use auto const& to match the actual vector element types.

This was 2.3% of CPU time while opening a YouTube video.
2026-02-21 15:53:22 +01:00
..
CustomElementDefinition.cpp LibWeb: Make CustomElementDefinition relationship with GC more sane 2024-12-27 10:02:58 +01:00
CustomElementDefinition.h LibWeb: Make CustomElementDefinition relationship with GC more sane 2024-12-27 10:02:58 +01:00
CustomElementName.cpp LibWeb/HTML: Allow more characters in custom element names 2025-07-08 17:08:39 +01:00
CustomElementName.h LibWeb/HTML: Allow more characters in custom element names 2025-07-08 17:08:39 +01:00
CustomElementReactionNames.cpp LibWeb: Remove the initialize_strings methods 2025-01-12 00:35:58 +01:00
CustomElementReactionNames.h LibWeb: Implement 'State-preserving atomic move integration' 2025-04-26 08:45:37 -06:00
CustomElementReactionsStack.h LibWeb: Use weak references in the custom elements reaction stack 2025-12-25 20:21:37 +01:00
CustomElementRegistry.cpp LibWeb: Avoid unnecessary GC::Root copies in find_if lambdas 2026-02-21 15:53:22 +01:00
CustomElementRegistry.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
CustomElementRegistry.idl Meta: Disallow links to single-page HTML spec 2025-02-05 16:04:50 -07:00
CustomStateSet.cpp LibWeb: Add CustomStateSet IDL type 2025-07-04 18:10:28 +01:00
CustomStateSet.h LibWeb: Add CustomStateSet IDL type 2025-07-04 18:10:28 +01:00
CustomStateSet.idl LibWeb: Add CustomStateSet IDL type 2025-07-04 18:10:28 +01:00