Batch operations
Combine many changes into one operation that recalculates once at the end, by callback or by suspending and resuming evaluation.
3 stepsWatch it once, then it is yours: click into the grid at any point to take over.
Run the thousand edits both ways and compare the times; run them again to measure again.
const at = (row) => ({ sheet: 0, col: 0, row });// One by one: 1,000 recalculationsfor (const [row, units] of edits)hf.setCellContents(at(row), units);// Not run yet// In a batch: one recalculation, at the endhf.batch(() => {for (const [row, units] of edits)hf.setCellContents(at(row), units);});// Not run yet
Run the edits, and each way is timed here, in your browser.
Each run changes all 1,000 lines.
Make every data point count. Turn millions of them into actionable wisdom.
Let’s make it easier.
Smoother. Faster. All Handsontable.