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
CustomElementDefinition.h
CustomElementName.cpp
CustomElementName.h
CustomElementReactionNames.cpp
CustomElementReactionNames.h
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
CustomStateSet.cpp
CustomStateSet.h
CustomStateSet.idl