mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
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. |
||
|---|---|---|
| .. | ||
| ResizeObservation.cpp | ||
| ResizeObservation.h | ||
| ResizeObserver.cpp | ||
| ResizeObserver.h | ||
| ResizeObserver.idl | ||
| ResizeObserverEntry.cpp | ||
| ResizeObserverEntry.h | ||
| ResizeObserverEntry.idl | ||
| ResizeObserverSize.cpp | ||
| ResizeObserverSize.h | ||
| ResizeObserverSize.idl | ||