3 ms·
> quickly scroll through a list of up to 100000 messages. You can do this with JS and HTML. There are some popular small JS libs that do just that. It works
by frik 10y ago
> quickly scroll through a list of up to 100000 messages.
You can do this with JS and HTML. There are some popular small JS libs that do just that.
It works like this: it creates a div with a very big "height" value to get the scrollbar look like there is a long list, and JS just loads in the visible area plus a few items above and below, and reloads data as you scroll. It works very good in Chrome and Firefox, and even okay in IE11.
- jancsika 10y agoDoes it still work well if I click-drag the scrollbar very quickly from the top to the middle or bottom of the list? Or if I use a keyboard shortcut to jump immediately to beginning or end?
- brute 10y agoThey actually talk about this a little way deeper into the thread. Here is a prototype they made http://benbucksch.github.io/trex/fastlist-test.html http://benbucksch.github.io/trex/fastlist-test.html
- frik 10y agoYes, that's the point. The div is a normal HTML element with a normal scrollbar.