library · inferred from evidence
algolia/autocomplete
A library that caused continuous style recalculations and high CPU usage in Safari-based browsers.
- algolia/autocomplete causes continuous style recalculations and high CPU usage in Safari
Two findings and fixes came out of the thread. The immediate cause: the resize listener tied to the detachedMediaQuery (packages/autocomplete-js/src/autocomplete.ts) fired every frame in Safari because requestAnimationFrame(setPanelPosition
- algolia/autocomplete causes continuous style recalculations and high CPU usage in Safari
In Safari-based browsers, loading algolia/autocomplete caused severe performance problems: layout styles were continuously invalidated and recalculated, CPU stayed overloaded, and the rendering queue stayed full, making the page visibly slo