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

autoResize calls $apply every 250ms #2284

Closed
KylePDavis opened this issue Dec 5, 2014 · 3 comments
Closed

autoResize calls $apply every 250ms #2284

KylePDavis opened this issue Dec 5, 2014 · 3 comments

Comments

@KylePDavis
Copy link

Every time that ui.grid.autoResize polls for size changes it calls $apply (by way of $timeout). This can be very heavy on a site with a lot of watchers or complex $watch listeners.

At the very least I propose that we stop calling $apply as part of $timeout and call it explicitly instead. Even better yet I think that maybe we should only resize on $apply. Worst case we could support both.

Here is a plnkr example that I will make into a PR once we figure out which way we want to go with this.

@c0bra
Copy link
Contributor

c0bra commented Dec 5, 2014

Seems like this change would also fix #2247. I'll look into it today.

@c0bra
Copy link
Contributor

c0bra commented Dec 5, 2014

Problem is writing a test for this if we change it to setTimeout.

@c0bra c0bra closed this as completed in 9c495da Dec 5, 2014
@c0bra
Copy link
Contributor

c0bra commented Dec 5, 2014

OK I figured out a way to get the tests working. Let me know if I've broken everything.

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

No branches or pull requests

2 participants