I've been profiling Tabulator on large datasets and ended up with a handful of small, self contained performance PRs.
No behaviour chnage on any, but they're related so I figured a short overview in one place would help.
The PRs:
Everything was measured against master (9539446). A few of these have a noticeably perf impact.
With all of them applied, a typical render → sort → filter pass over 20k rows went from ~56ms to ~30ms (roughly 1.8× faster), mostly from the render and sort paths.
I've been profiling Tabulator on large datasets and ended up with a handful of small, self contained performance PRs.
No behaviour chnage on any, but they're related so I figured a short overview in one place would help.
The PRs:
slice()for the active-rows copy — grid filter −23%;setActiveRows166× isolatedarguments/forEachallocation in the event buses - grid render −36%; dispatch 7–9× isolated_sortItems2.6× / number sorter 4.9× isolatedfilterRowup to 3.8×,generateRowData2× isolated (negligible in a full grid)getChildren1.6× isolated (negligible in a full grid)reinitializeRows1.5× isolated (negligible in a full grid)deepClonecircular refs with a WeakMap (also fixes a circular ref clone bug) — 38–147× isolated (off the render path)Everything was measured against master (9539446). A few of these have a noticeably perf impact.
With all of them applied, a typical render → sort → filter pass over 20k rows went from ~56ms to ~30ms (roughly 1.8× faster), mostly from the render and sort paths.