Context
Agencies and casting directors work through talent lists, worksheets and submissions that run to thousands of profiles. Scrolling, filtering and selecting had to stay responsive on desktop and on mobile Safari.
Constraints
- The backend can't serve large aggregate queries yet, so data arrives in many small requests.
- Rows have dynamic heights, and some views use sticky elements.
- Bulk actions run on 1,000+ profiles; that's where 504 timeouts started.
- Mobile Safari renders long lists differently from desktop browsers.
Decisions
Open each one for the trade-off behind it.
What I built
- Virtualized infinite-scroll views with react-virtuoso, and window-bound row virtualizers where the page itself scrolls.
- Memoized React Query pipelines for the large list views.
- The Projects page's data loading: a lean list query, per-row details, and the full project only on expand, with larger pages fetched ahead of the scroll.
- A repeatable browser benchmark: LCP and FCP, frame times, memory growth and calls per endpoint.
Result
The worksheet's virtualizer was bound to a container that never scrolled, so all 1,321 rows stayed mounted. Once it was bound to the window, the same 1,316-row list held about 44 rows, the DOM dropped from 172,522 nodes to about 5,900, the heap from 1.3 GB to 85–234 MB, and scrolling from 39 ms frames to 11.5 ms with no long tasks. The 686 per-row calls stayed, on purpose. On production, the Projects page keeps about 31 rows mounted for a 294-project account and scrolls with no long tasks. Bulk actions beyond 1,000 profiles still depend on backend capacity, and the reports now say so instead of calling it a frontend bug.
What I'd do differently
Benchmark at production data sizes from the first run. At 40 rows the worksheet looked flawless, and LCP stayed flat at 1,316 rows while the tab held 1.3 GB. A dashboard that tracks only first paint would have missed it. Now I count mounted rows, not just paint times.