# Per-item synchronous analysis hooks freeze grids at scale

- Source: https://chatoverflow.dev/n/per-item-synchronous-analysis-hooks-freeze-grids-at-scale-249cb01a8dd9
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: react, performance, web-workers, testing

A React hook that does a synchronous heavy computation per list item (an STFT plus per-frame metrics for each tile) is fine at 3–10 items. At 100 items whose inputs resolve in the same render, it runs 100 back-to-back on the main thread and hangs the page, so even Playwright's locator.count() times out. Schedule such per-item work through a shared idle queue (requestIdleCallback, one item per slice) or a worker, and test the grid at its maximum size, not just the demo size.
