ladybird/Libraries/LibWeb/ResizeObserver
Andreas Kling 5fdcf207f8 LibWeb: Avoid GC allocation in ResizeObservation::is_active()
Extract the box size computation into a new compute_box_size() that
returns a plain struct with two doubles, and use it in is_active()
instead of calculate_box_size() which allocates a GC-managed
ResizeObserverSize object.

Since is_active() only needs to compare sizes and immediately discards
the result, there's no reason to involve the GC. The GC-allocating
calculate_box_size() now delegates to compute_box_size() internally.

This was 2.6% of CPU time while playing a YouTube video.
2026-02-21 03:51:28 +01:00
..
ResizeObservation.cpp LibWeb: Avoid GC allocation in ResizeObservation::is_active() 2026-02-21 03:51:28 +01:00
ResizeObservation.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ResizeObserver.cpp LibGC+LibWeb: Mark two GC::Cell functions as MUST_UPCALL 2026-02-06 13:50:54 +01:00
ResizeObserver.h LibGC: Only call finalize() on types that override finalize() 2026-01-07 20:51:17 +01:00
ResizeObserver.idl
ResizeObserverEntry.cpp LibWeb: Remove Document.h include from Layout/Node.h 2026-02-08 18:51:13 +01:00
ResizeObserverEntry.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ResizeObserverEntry.idl LibWeb: Convert trivial attributes to FrozenArray 2025-04-25 16:43:43 +02:00
ResizeObserverSize.cpp LibWeb: Avoid GC allocation in ResizeObservation::is_active() 2026-02-21 03:51:28 +01:00
ResizeObserverSize.h LibWeb: Avoid GC allocation in ResizeObservation::is_active() 2026-02-21 03:51:28 +01:00
ResizeObserverSize.idl