perf(store): fix packs tab stutter (animated drop-shadow filters + per-tile backdrop blur) - #4821
Conversation
…er-tile backdrop blur The store packs tab ran three infinite CSS animations per plutonium icon, including one animating filter: drop-shadow (re-rasterized every frame) and a 0.15s sub-pixel jiggle, over a grid where every cosmetic tile also had backdrop-filter: blur(8px). Any one of these animations forced the whole blurred scene to re-render each frame: with the production catalog the packs tab measured ~18fps (median frame 50ms) in a software-rendered harness, and 60fps with the icon animations paused. - PlutoniumIcon: pulse now animates opacity/scale of a pre-blurred radial-gradient glow layer (compositor-only) with a static drop-shadow on the icon; the jiggle is removed; the 7s rotation stays. - CosmeticContainer: drop the per-tile backdrop blur — tile backgrounds are ~85% opaque gradients over the already-blurred modal shell, so it was invisible but multiplied blur surfaces (867 -> 21). Same harness after the change: ~39fps with all animations running, and a 16.7ms median frame once the modal-shell blur (GPU-trivial on real hardware) is excluded. Visuals are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe changes remove an ineffective tile blur and update Plutonium icon animations. The icon now uses opacity, transforms, a radial-gradient glow, and a static image shadow. ChangesCosmetic rendering updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The store's packs tab on openfront.io is slow and stuttery, while local dev feels fine. Local dev has no API, so no packs render — the regression only appears when pack tiles are present.
Diagnosis
Reproduced production locally by intercepting
cosmetics.jsonwith the real prod catalog (7 plutonium packs) and measuring the store in a headless-Chromium harness:Each
plutonium-iconruns three infinite CSS animations, and any one of them alone tanks the tab to ~16fps:plutonium-pulseanimatesfilter: drop-shadow(...)(2–3 stacked shadows) — not compositor-animatable, re-rasterizes the icon every frameplutonium-jiggle— a 0.15s infinite ±0.4px jitter, visually imperceptible but keeps the compositor permanently busyplutonium-rotate— fine by itself in principle, but every animated frame re-renders a scene containing 867 elements withbackdrop-filter: blur(8px)(every cosmetic tile + modal shell)A devtools trace confirmed the main thread is nearly idle — the cost is all compositor/raster work, which is exactly what stutters iGPU/mid-range machines.
plutonium-iconis also used in the headercurrency-display, so logged-in users paid this cost outside the packs grid too.Fix
opacity/transform(compositor-only), with a static drop-shadow on the icon; the jiggle is removed; the 7s rotation stays.will-changehints added.backdrop-filter: blur(8px). Tile backgrounds are ~85%-opaque gradients over the already-blurred modal shell, so the per-tile blur is visually invisible — but it multiplied blur surfaces 867 → 21.Results
Same harness after the change: ~39fps with all animations running (up from 17.7), and the median frame reaches 16.7ms (60fps) once the modal-shell blur — trivial for real GPUs, slow only under the harness's software rasterizer — is excluded. Before/after screenshots are visually identical (glow pulse look preserved).
Caveat: absolute numbers come from software-rendered headless Chromium, which exaggerates raster cost; the eliminated work (per-frame filter rasterization × dozens of blur surfaces) is what matters on real hardware.
🤖 Generated with Claude Code