View as Markdown

Pivot Table

Performance

Pivot Table budgets on 1,000,000 rows (initial aggregation, first paint, drill, filter, sort), the measured timings, and how the release gates assert them.

The pivot engine aggregates in one pass over typed columns, keeps every drill, filter and sort incremental, and runs in a Worker when you pass worker. Every budget below is a release gate.

Measured timings

The fixture has 1,000,000 seeded rows, 3 row fields, 2 column fields and 2 value fields (about 50,000 × 500 cells when fully expanded). Each timing ends with reading the first painted 60 × 60 window, so lazy work is counted. Salmon UI numbers are medians from npm run test:perf (packages/pivot-table/tests/engine/pivot-performance.test.ts) and the production-build browser run (tests/browser/pivot-perf.spec.ts) on an Apple M5 Max, measured 2026-11-24 with other test suites running on the same machine (load average about 7).

<<<

Scenario Budget Salmon UI
Initial aggregation in a Worker, data to result ready ≤ 1.5 s 1,123 ms
Initial aggregation, in-process (reported) 371 ms
Initial render to first painted viewport, Worker ≤ 1.8 s 860 ms
Sort a row field ≤ 100 ms 1.9 ms
Sort a column field ≤ 100 ms 2.1 ms
Filter a row field (apply) ≤ 300 ms 21.4 ms
Clear the row filter ≤ 300 ms 10.0 ms
Filter a column field (apply) ≤ 300 ms 49.7 ms
Clear the column filter ≤ 300 ms 41.1 ms
Drill down a row member ≤ 50 ms 4.2 ms
Drill up a row member ≤ 50 ms 1.8 ms
Drill down a column member ≤ 50 ms 1.9 ms
Drill up a column member ≤ 50 ms 1.7 ms

Other paths have budgets too: value sort on one column 3.0 ms (≤ 150 ms), moving a field between axes 91 ms (≤ 1.5 s), SSR compute of 10,000 rows 8.1 ms (≤ 100 ms), opening the field list 3.4 ms p95 (≤ 50 ms), opening the member editor of a field with 100,000 members 1.6 ms p95 through the Worker (≤ 50 ms), and scrolling 100,000 result rows at 2,000 px/s with 0 blank frames and a 16.8 ms p95 frame.

How the gates run

pivot-performance.test.ts fails a timing that is over its budget or over its fixed reference ceiling. Initial aggregation, drill, filter and sort are bench core paths, so npm run release:verify gates them against tooling/bench/baseline.json too. The browser rows (first paint, scroll, field list, member editor) are in npm run test:browser.

Try it

The demo below generates up to 1,000,000 rows in your browser and shows the engine time of each step (onComputeEnd's duration) next to its budget. It runs the engine on the main thread of your machine, so its numbers are not the gated ones above; use them to compare scenarios. paging (Pivot Table) and the exact pre-aggregation of averages (Aggregation) are in the same demo.

Performance with a million rows

Open demo

Generate up to 1,000,000 raw rows and read the measured engine time of the aggregation, a sort, a filter and a drill next to the release budgets; averages stay exact under pre-aggregation; paging is opt-in.

Country / Product
2022
2023
2024
2025
2026
Grand total
Country 01
47,517
53,633
51,485
48,478
50,499
251,612
Country 02
47,139
42,028
57,683
50,454
49,942
247,246
Country 03
53,229
45,226
44,213
57,812
56,779
257,259
Country 04
49,282
52,167
58,135
45,705
62,443
267,732
Country 05
49,917
47,778
46,770
57,898
36,353
238,716
Country 06
51,846
56,831
47,483
50,710
44,915
251,785
Country 07
45,841
54,732
51,147
52,916
47,222
251,858
Country 08
43,636
52,833
47,479
50,752
48,517
243,217
Country 09
46,190
52,349
51,016
44,937
51,676
246,168
Country 10
42,110
51,388
43,428
44,663
57,296
238,885
Country 11
50,467
44,205
61,285
53,656
52,696
262,309
Country 12
52,623
53,161
42,227
49,336
44,207
241,554
Country 13
56,227
54,370
49,946
58,786
60,166
279,495
Country 14
37,225
55,825
61,495
46,367
39,873
240,785
Country 15
47,755
44,345
59,389
47,875
47,219
246,583
Country 16
54,529
45,339
50,853
53,356
45,774
249,851
Country 17
38,342
47,815
35,624
42,406
53,941
218,128
Country 18
50,454
43,867
49,600
45,671
44,497
234,089
Country 19
48,410
55,866
45,893
51,054
49,680
250,903
Country 20
55,506
51,409
51,958
50,587
47,162
256,622
ActionRaw rowsEngine timeBudget at 1,000,000 rows

Status ready · 41 rows × 6 value columns