New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throttle scroll handler #271

Merged
merged 1 commit into from Apr 27, 2017

Conversation

Projects
None yet
2 participants
@javan
Member

javan commented Apr 27, 2017

Limit onScroll to once per animation frame to decrease page reflows (window.pageXOffset / window.pageYOffset cause them) and improve FPS performance when scrolling.

Throttle scroll handler
Limit `onScroll` to once per animation frame to decrease page reflows and improve FPS performance when scrolling.

@javan javan requested review from packagethief and sstephenson Apr 27, 2017

@packagethief

Thanks Javan!

@javan javan merged commit 96b92ac into master Apr 27, 2017

@javan javan deleted the throttle-scroll-handler branch Apr 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment