Hacker News new | ask | show | jobs
by paddy_m 806 days ago
Past a certain table size, the JS libraries will use less memory. DOM elements take a lot of memory. Libraries like ag-grid only render a small portion of the total table at a time.

The next performance gain web tables comes from using a binary encoding instead of JSON, particularly arrow. Perspective uses arrow (in addition to rendering to canvas).

IME building buckaroo on top of ag-grid, I can render the table with up to about 300k elements very performantly with just JSON. Rendering speed is a non factor because only 50 rows are rendered at a time. Moving to arrow-js should be about 3 times faster for the entire system (python serialize, js deserialize, js render). Beyond 900k elements, you really want to lazily load from the server as the user scrolls. The memory usage for just the data in the browser tends to slow things down. (I am working on a library and benchmark for different serialization techniques).

2 comments

>Libraries like ag-grid only render a small portion of the total table at a time

such libraries often mess the scrolling and searching up

> DOM elements take a lot of memory.

Due to their regular structure, tables would provide an opportunity for HTML implementations to optimize and greatly reduce that memory usage.