prevent crash with large data set (~2 mil entries)
I'm trying to get a virtualized table to work with a data set of around 2mil entries, but as soon as
table.getRowModel()
gets called the tab crashed. Now i was wondering if there is a approach that would work in my case, or any other suggestions.
repro: https://stackblitz.com/edit/tanstack-table-fcnlfz7l?file=src%2Fmain.tsx (example from the docs with data size increased to 2mil)Christian K
StackBlitz
Table Virtualized Rows Example (duplicated) - StackBlitz
Run official live example code for Table Virtualized Rows, created by Tanstack on StackBlitz
3 Replies
ambitious-aqua•19h ago
Hmm, 2 mil is a lot of rows.
Does the table also do sorting/filtering?
grumpy-cyanOP•18h ago
yea, both of these sadly. i guess adding a layer and doing pagination w/ sorting and filtering on the client is the only approach to get this to be somewhat performant
ambitious-aqua•11h ago
Yeah
But in general 2 mil is a lot, tanstack/db can help here, since it loads all the data and can paginate and sort with good performance.