Kevin Thomas Van Cott@KevinVanCott
Up to 90% less memory usage?
I'm working on a new blogpost to examine the performance improvements of TanStack Table V9 and first up is memory usage.
I just created some memory usage benchmarks for TanStack Table V9 vs V8, and it verifies that Table V9 may use up to 90% less memory than V8 on our example with 100k+ virtualized rows. This is kind of a best-case scenario, so I'll need to benchmark even more common table setups in order to be as transparent as possible.
This improvement is due in large part to our refactor where we store object functions on a single prototype instead of creating them for every object.
APIs like row.getVisibleCells, column.toggleSorting(), etc... now all defined just once on `table._rowPrototype`, `table._columnPrototype`, etc.
When I first attempted this refactor, I was worried that it might be a waste of time for an improvement that could be negligible. For common smaller tables, it still kind of is, but for large, virtualized tables where the number of objects created scales linearly with memory usage, it's seeming to make all the difference.