Commit c3a6641
authored
🤖 perf: cap shimmer animation at 30fps + fix layout shift (#1002)
## Summary
Caps the shimmer animation at 30fps to reduce repaints on high-refresh
displays.
### Changes
- Uses `steps(42, end)` timing function to limit animation to ~30fps
- On 240hz monitors, this reduces repaints by 8x (240 → 30)
- Still smooth enough for a loading indicator
### Why?
`background-position` isn't compositor-only, so each frame triggers a
main thread repaint. On high-refresh displays this was causing
noticeable frame drops during streaming.
---
_Generated with `mux`_1 parent 98c2743 commit c3a6641
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1683 | 1683 | | |
1684 | 1684 | | |
1685 | 1685 | | |
1686 | | - | |
| 1686 | + | |
| 1687 | + | |
1687 | 1688 | | |
1688 | 1689 | | |
1689 | 1690 | | |
| |||
0 commit comments