I've been profiling Tabulator on large datasets and ended up with a handful of small, self contained performance PRs. Each one is behaviour preserving and stands on its own, 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 move real grid work noticeably: 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. The rest are smaller wins that are clear in isolation but negligible in a full grid render. I've called that out on each PR so it's obvious where the actual impact is. I also have numbers for a 250k row table which I will add asap.
Each PR has its own before/after numbers in the description. Happy to share the benchmark scripts or tweak anything. No rush, merge in whatever order works for you.
I've been profiling Tabulator on large datasets and ended up with a handful of small, self contained performance PRs. Each one is behaviour preserving and stands on its own, 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 move real grid work noticeably: 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. The rest are smaller wins that are clear in isolation but negligible in a full grid render. I've called that out on each PR so it's obvious where the actual impact is. I also have numbers for a 250k row table which I will add asap.
Each PR has its own before/after numbers in the description. Happy to share the benchmark scripts or tweak anything. No rush, merge in whatever order works for you.