Improved performance of scroll event handling