What problem does it solve?
Frontend pages with heavy animation work often keep running CSS animations, requestAnimationFrame loops, and WebGL renderers even when offscreen, causing janky scrolling, high CPU/GPU usage, memory leaks, and long-session slowdowns that are hard to diagnose without live measurement.
Core Features & Use Cases
- Browser-Based Profiling: Captures baseline measurements at top, mid, footer, and mobile viewports using Codex Browser, counting running offscreen animations by name and inspecting canvas/WebGL elements separately.
- Targeted Optimization Patches: Adds IntersectionObserver-based visibility gating, pauses CSS animations with
animation-play-state, and cancels/resumes RAF loops for canvas, WebGL, GSAP, and physics effects.
- Memory Leak Hardening: Audits and fixes cleanup for timers, listeners, observers, Three.js resources, GSAP tweens, media streams, and async loaders that resolve after unmount.
- Use Case: A React/Vite marketing page slows the computer over time; use this Skill to profile the route, pause offscreen marquee and skeleton animations, dispose WebGL resources on unmount, and verify
offscreenRunningCount: 0 across all sampled viewports.
Quick Start
Use $optimize-web-animations to profile my localhost landing page for offscreen animations and memory leaks, then patch the worst offenders and verify the results.