2 ms·
Yeah, but let's say scroll events happen every 10ms and the callback takes 50ms to complete. The first scroll event will be relatively fast, because it's just d
by underwater 12y ago
Yeah, but let's say scroll events happen every 10ms and the callback takes 50ms to complete. The first scroll event will be relatively fast, because it's just doing scheduling.
But when the callback kicks in, the scroll events that happen in the 50ms it takes will be buffered. The browser can't pause the callback to run the event handler.
So we will still get janky performance.