4 ms·
> We must pay attention to also keep technical qualities that many of our users rely on. An obvious one is that the new implementation must be able to quickly
by jancsika 10y ago
> We must pay attention to also keep technical qualities that many of our
users rely on. An obvious one is that the new implementation must be
able to quickly scroll through a list of up to 100000 messages.
Does any cross-platform GUI toolkit have a widget that can handle this with sane defaults?
- trishume 10y agoQt, as long as you back the view with a model with O(1) lookup, can handle up to INT_MAX rows perfectly fast. I expect other cross-platform GUI toolkits work similarly. Most native table/list views work on an assumption of uniform row height and thus handle huge lists with no trouble. The problem browser based apps run into is rendering the entire list into the DOM and thus the browser has to lay out the whole thing in order to compute scroll bars and scroll positions. You can work around this using requestAnimationFrame, large empty padding divs, and inspecting the scroll position to create DOM elements for only things that you compute are visible. At my last job I implemented a web based table that could do 60fps scrolling on 100,000 items that were all dynamically updating using js_of_ocaml and https://github.com/janestreet/incr_dom https://github.com/janestreet/incr_dom.
- acemarke 10y agoThere's also toolkits like React-Virtualized: https://github.com/bvaughn/react-virtualized https://github.com/bvaughn/react-virtualized .
- 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.
- jodrellblank 10y agoDoes any human have a brain which can skim read 100,000 email subjects? 10/second for 2.5 hours, no pause, no breaks. You read those emails? You acted on them? You remember what's in them? Archived data is a hoarding disorder, a garbage heap.