3 ms·
Another high-level event we need is scroll-end, or better, scroll-to-end. On scroll is very expensive on mobile and leads to lagginess.
by MatthewPhillips 14y ago
Another high-level event we need is scroll-end, or better, scroll-to-end. On scroll is very expensive on mobile and leads to lagginess.
- nevir 14y agoI think taking a page from the native frameworks would be good here: Have a scroll start, scroll end, and nothing else. If you want to update during the scroll, you should be using requestAnimationFrame
- mistercow 14y agoWhat's wrong with throttled on-scroll?
- nevir 14y agoYou can't do smart things on each frame (for ex, subbing in new content as the user scrolls) You also don't know for sure when a scroll ends w/ the current impl
- mistercow 14y ago>You can't do smart things on each frame (for ex, subbing in new content as the user scrolls) You wouldn't be able to do that with scroll-end either. >You also don't know for sure when a scroll ends w/ the current impl That makes sense, but that issue is orthogonal to performance.