4 ms·
What about the delay when loading a humongous table? I occasionally need to load a page with 10,000 (or more) table cells, and those are always slow, and no on
by ars 16y ago
What about the delay when loading a humongous table?
I occasionally need to load a page with 10,000 (or more) table cells, and those are always slow, and no one seems to test browser speeds on those.
- Groxx 16y agoHow much of that time is spent loading? Have you tried saving & opening locally? Is the data being handled in any way by javascript, which could be inefficient (for instance: tons of table tools use JS hover effects, instead of CSS). Am actually interested, this is not to say it's not actually slow. Just trying to find out why / how slow it is.
- ars 16y agoIt was local, php generated output from a database. (And the php wasn't slow, saving to a file was almost instant.) I think it was just a totally barebones table, with tr and td of many rows from a table. I also had another one where it made an editable form from the data (the data had a bit more structure than the first, some css, but no onload javascript (just onclick)). It was handmade, so no hover effects or other things. Firefox was really slow and my customer eventually switched to using chrome for that page. But it's still slow, just not as slow. I remember having my browser freeze totally for about 10 minutes (yes I timed it).
- Groxx 16y agoStill give it a try from a static HTML file, it could be different. The 10 minutes sounds like more of a bug than anything else. I've loaded 20mb heavily-styled "books" in HTML that took ~10 seconds to load, but scrolled like molasses, but I've never seen a large table behave that poorly (though I've only handled 1-2 thousand rows).
- ars 16y agoOnce the 10 min was over, it worked perfectly fine, and scrolled fast too. But memory usage went up a LOT.
- lukev 16y agoWe just addressed this problem at work. The answer was to provide better tools that allowed users to analyze/interact with the data without having to render 10k rows to the screen. It's not like they were able to read them all anyway. I'm going to go out on a limb and say unilaterally that anything that's just dumping 10,000 rows to the screen has, a priori, terrible usability. It's not really a case I feel browser designers ought to spend a lot of time optimizing for.
- ars 16y agoThat's true, but there wasn't time (i.e. money) to design something better. It started much much much smaller, but they used it so much it grew far beyond it's initial design, and we were never able to come back to it to do something better. (It's an internal tool BTW, so we, i.e. they, just dealt with it.)
- deleted 16y ago[deleted]
- ks 16y agoI don't have experience with tables as large as yours, but I have noticed that if you give the browser hints about the columns using the <col>-tag, it loads larger tables faster.
- dkasper 16y agoMaybe you could render the cells when they're visible, similar to how UITableView works on iPhone.
- csomar 16y agoSo why on earth does AJAX exist? To solve such bottlenecks. Do AJAX calls for 100 cells instead of 10K.