Moving a Spreadsheet Engine Off the Main Thread to Fix 100,000-Row Sort Stalls

A client-side update enabling multi-column sorting and automatic snapshot persistence in a collaborative spreadsheet and dependency-graph editor performed well on small CI fixtures but failed with enterprise customers' 100,000-row workbooks. Sorting blocked the browser's main thread for hundreds of milliseconds, causing dropped input and frame rates near 4 FPS. An initial fix that chunked the sort into idle callbacks did not resolve contention over shared memory, blocking serialization, and inconsistent intermediate state. The engineering team instead moved the data engine into Web Workers, used zero-copy transfers and OPFS-based binary snapshots, and ran sorting through batched WebAssembly calls. The architecture keeps the UI thread responsive at 60 FPS during dataset mutations.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in