Skip to content
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

Debounce onResize to avoid performance issues #91

Closed
wants to merge 6 commits into from
Closed

Debounce onResize to avoid performance issues #91

wants to merge 6 commits into from

Conversation

kribblo
Copy link

@kribblo kribblo commented Jan 28, 2016

Only really had trouble on IOS 8 Safari, where onResize could fire so much it blocked the whole browser for a full minute on a simple orientation change.

Either way, should not need to fire that often, so we debounce it by 1 second.

Pull request also contains rebuilt distribution files with this change.

@customlogic
Copy link
Contributor

Thanks for your help. I've incorporated your change, with a few tweaks:

  • debounce method lives in common.js
  • debounce method calls function at start, then blocks for timeout (rather than only running after timeout ends)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants