mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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.