Large-scale recalculation performance and worker offload
This feature sets documented performance budgets for parsing, graph building and recalculation on large grids. It adds AST caching for repeated formula templates and an optional Web Worker mode that keeps the UI responsive during long recalculations. Progress and cancellation are exposed for very large workloads.
Planned. This page shows the specification from issue #192. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A 100,000-row grid with three formula columns and a performance stats panel showing parse time, eval time and node count.
Expected behavior
In worker mode, scrolling stays smooth during recalculation and a progress bar advances. The stats panel shows AST cache hits for repeated templates. Cancelling leaves the cells in the stale state.
Planned API surface
option: formulas.useWorkeroption: formulas.chunkSizeevent: recalcProgressmethod: formulaEngine.cancelRecalc()method: formulaEngine.getStats()Acceptance criteria
- A full recalculation of 100,000 simple formulas meets the documented budget on reference hardware. (pending)
- Identical relative formula templates share one cached AST. (pending)
- Worker mode produces results identical to main-thread mode. (pending)
- The main thread has no long task over 50 ms during worker recalculation. (pending)
- Cancellation leaves the engine in a consistent state. (pending)