Doing lots of work (especially DOM work/repaints) on every 'scroll' event can kill scroll performance, so debouncing the scroll handling alleviates this.
Where available, this patch uses requestAnimationFrame() to align paints with the browser’s frame scheduling; otherwise it just throttles to ~67 updates per second.
Doing lots of work (especially DOM work/repaints) on every
'scroll'
event can kill scroll performance, so debouncing the scroll handling alleviates this.Where available, this patch uses
requestAnimationFrame()
to align paints with the browser’s frame scheduling; otherwise it just throttles to ~67 updates per second.Based on the techniques described here.