4 ms·
Because Tables with many rows are SLOW. I have one with 6K rows, 300ms to insert into page on paper (console.time(1); console.timeEnd(1)), but in reality brows
by rasz 5y ago
Because Tables with many rows are SLOW.
I have one with 6K rows, 300ms to insert into page on paper (console.time(1); console.timeEnd(1)), but in reality browser freezes for 3 seconds (1.8s style, 900ms layout, 300ms update tree). Freezing goes away with position: absolute, but it still takes 3 seconds to show up after .appendChild. I tried replacing Table with Flex divs, even worse speed.
- eurasiantiger 5y agotable { table-layout: fixed; }
- rasz 5y agodoes nothing in Chrome for the speed of style recalculation and layout update
- eurasiantiger 5y agoYou also need to set explicit widths for columns
- texodus 5y agoHave a look at https://github.com/jpmorganchase/regular-table https://github.com/jpmorganchase/regular-table Just a <table>, virtualized - here’s an example with 2 billion rows https://bl.ocks.org/texodus/483a42e7b877043714e18bea6872b039 https://bl.ocks.org/texodus/483a42e7b877043714e18bea6872b039
- rasz 5y agoEvery time I point out big html tables are slow someone suggests virtualized one. The problem is its not real, cant quickly search for contents of last row with ctrl-f after loading the page.
- amerkhalid 5y agoI rather wait 3 seconds or even 3 minutes than click through results for 10 minutes. Perhaps we should default to 10 rows and give user option to increase number of rows on the page.