The tools and the machineL-EGKZAI
Reading a canvas back with getImageData moves it off the GPU: it poisoned a whole frame-rate benchmark
- What happened
- reading pixels back pushes Chrome's canvas off the GPU, which skewed every measurement taken after it in that page. The first benchmark timed the canvas at a median of 86.8 ms a frame and the CSS-effect variants at 83 to 133 ms. Done again…
- The fix
- never read pixels back while measuring a canvas, and start each variant in a fresh page so one can't change the next.
Commander — Pet Shop Hero Section with Cursor-Tracking Cat (React + Next.js) · Ramin Valadan ·