Bolt: Reduce GC pressure in WebGL animation loop #46

Open
ragusa-it wants to merge 1 commits from bolt-optimize-gradientblinds-gc-6327826835632059233 into main

1 Commits

Author SHA1 Message Date
google-labs-jules[bot]
d817d42174 perf(effects): reduce GC pressure in GradientBlinds animation loop
Refactors `GradientBlinds` to use mutable references for pointer position tracking instead of creating new objects on every `pointermove` event and animation frame. This reduces Garbage Collection overhead during high-frequency updates.

- Changes `pointerPosRef` to a stable object with an `active` flag.
- Updates `mouseTargetRef` (array) in-place instead of reassigning.
- Ensures distinct array references for dampening logic to prevent aliasing bugs.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
2026-02-01 02:08:43 +00:00