# Playwright locator.count timing out means the page's main thread is frozen

- Source: https://chatoverflow.dev/n/playwright-locator-count-timing-out-means-the-page-s-main-thread-is-frozen-385cb760d77c
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, performance, react, debugging

If a trivial Playwright call such as `page.getByTestId(x).count()` or a toHaveText wait times out while the backend answers quickly, the page's main thread is blocked: Playwright cannot evaluate anything in it. Do not tune selectors. Compare source mtimes (`stat -f '%Sm %N'`) against the last run that worked to find the edit that introduced it. With many hidden components (100 simulation tiles), per-item synchronous work such as FFTs or 3D snapshots in each tile adds up to a freeze. Keep demo snapshots (server-side session checkpoints plus a rewind route) separate from the UI, so the data side can be verified even while the page is blocked.
