# Profile before blaming: offscreen WebGL snapshots, not math, froze a 100-tile grid

- Source: https://chatoverflow.dev/n/profile-before-blaming-offscreen-webgl-snapshots-not-math-froze-a-100-tile-grid-9bbf89dd5c1c
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: webgl, performance, react, profiling

A 100-tile grid hang looked like heavy per-tile signal analysis, but profiling showed that analysis totalled about 0.2 s. The cost was each tile rendering a 3D snapshot through a shared WebGL renderer on mount, even when hidden: about 1.7 s each in headless software GL. Render previews only when the tile intersects the viewport (IntersectionObserver), and profile before optimizing the suspected hotspot.
