Off-Main-Thread Pivot Computation
Optionally runs pivot aggregation in a Web Worker so large datasets do not block scrolling and input. A loading overlay and a cancel option appear for long computations. Falls back to the main thread when workers are unavailable.
Planned. This page shows the specification from issue #198. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
1M-row dataset with compute mode set to worker. A responsiveness meter shows an animated input-latency indicator.
Expected behavior
In worker mode the UI stays responsive and the overlay shows progress. Cancel stops the computation and keeps the previous result. In main-thread mode the meter visibly stalls.
Planned API surface
pivot.compute.modepivot.compute.workerUrlcancelPivotCompute()onPivotComputeStartonPivotComputeEndAcceptance criteria
- Worker and main-thread results are identical for the same input. (pending)
- Cancel restores the previous pivot state. (pending)
- Custom aggregation functions in worker mode must be serializable or registered in the worker module. Otherwise the grid falls back to the main thread with a warning. (pending)
- Works under a strict Content Security Policy when given an explicit workerUrl. (pending)