mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
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. |
||
|---|---|---|
| .. | ||
| CustomElementDefinition.cpp | ||
| CustomElementDefinition.h | ||
| CustomElementName.cpp | ||
| CustomElementName.h | ||
| CustomElementReactionNames.cpp | ||
| CustomElementReactionNames.h | ||
| CustomElementReactionsStack.h | ||
| CustomElementRegistry.cpp | ||
| CustomElementRegistry.h | ||
| CustomElementRegistry.idl | ||
| CustomStateSet.cpp | ||
| CustomStateSet.h | ||
| CustomStateSet.idl | ||