Hacker News new | ask | show | jobs
by simonbarker87 808 days ago
This looks great. I so wish that the HTML table element would get some progress - it’s so limited.

I don’t want to have to use some JS library component just to show tabular data especially given how badly they perform one big - but a server side rendered HTML table can be enormous and render fine. But again, so limited.

1 comments

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).

>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.