scrollability icon indicating copy to clipboard operation
scrollability copied to clipboard

Build some kind of preloading mecanism

Open mgcrea opened this issue 13 years ago • 4 comments

Playing with a long list (500+) facebook friends list with pics & buttons on each li.

The scroll feeling is only perfect when i have first scrolled down entirely. Before that i have some rectangles that render a bit late. Maybe (with an option) it could be possible to "pre-load / pre-scroll the list", displaying some kind of opaque loading msg over it.

mgcrea avatar Jun 19 '11 23:06 mgcrea

Have you tried using -webkit-transform: translate3d(0,0,0); on your li elements?

jasonwinn avatar Jun 22 '11 21:06 jasonwinn

I've tried that, didn't see a difference.

For really long lists, I think the only way we're going to get good performance is to create and destroy elements dynamically as you scroll, the way the Cocoa UITableView class works in iOS.

joehewitt avatar Jun 23 '11 04:06 joehewitt

Do you mean remove and re-append to DOM? I don't think the DOM changes will be able to keep up with the scrolling speed. Is there a way to scroll through the list very quickly, thus putting all the elements in JS memory, to allow for good scrolling feel later?

tilomitra avatar Jun 23 '11 06:06 tilomitra

About long lists & buffering, here is some interesting code from a sencha-touch Ext.List plugin addressing this specific point. Looks like it does indeed DOM manipulation.

http://www.sencha.com/forum/showthread.php?121225-High-Performance-Large-List-component-UxBufferedList https://github.com/Lioarlan/UxBufList-Sench-Touch-Extension/blob/master/UxBufList.js

mgcrea avatar Sep 11 '11 23:09 mgcrea