2 ms·
That's not a queue it's just a delayed async call (i.e. if 5,000 calls ask to be called they will all go without queuing in 50ms), what the other comment descri
by zamadatix 7y ago
That's not a queue it's just a delayed async call (i.e. if 5,000 calls ask to be called they will all go without queuing in 50ms), what the other comment described is a queue.
50ms is way too short, a user on a 1080p screen would need to scroll at 360 pixels per second to avoid loading every image along the way. Even trying to do that on purpose is hard as hell https://clickspeedtest.com/scroll-test.html https://clickspeedtest.com/scroll-test.html. Guaranteed that every mobile user is going to be loading every image on scroll over 4g as well creating the original back pressure issue now with 3 more frames of lag.
"smooth" does not mean "check every 3 frames" it means schedule things in a way they can happen immediately when the browser is ready, not your timer.