buildWaferMap is CPU-intensive on large datasets and would block the main thread.
createWafermapWorker wraps a native Worker and runs buildWaferMap off-thread — the page stays responsive while building.
The loading spinner is shown until worker.run(input) resolves; the timing badge shows how long the worker took.
Rendering (renderWaferMap) always runs on the main thread after the promise resolves.
Note: the worker trades total speed for responsiveness. The input is copied into the worker and the built dies are copied back (test values are moved, not copied), so it is slower overall than building directly and only pays off when a build is large enough to visibly freeze the page. For small datasets, build on the main thread. Results passed as columns (DieColumns) cross fastest; rows are copied on the page, which still freezes it briefly.