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

Performance issue: cell-nav refreshCellFocus on dataChange causes a lot of digest cycles #6302

Closed
Kimmen opened this issue Jul 7, 2017 · 0 comments

Comments

@Kimmen
Copy link

Kimmen commented Jul 7, 2017

We've stumbled upon a performance issue. We have fairly large grid with ~1000 rows and ~20 columns with cell-nav directive applied.

When updating the data source refreshCellFocus calls are queued (source) for each cell via $timeout service which causes a lot of digest cycles to run for us. In our case ~800 cycles are triggered and each digest cycle takes about 100 ms (due to comparing large objects). The browser is hogged for about 1:30 minutes, preventing the user to work.

Using $scope.$applyAsync() instead of $timeout eliminates this issue. I guess this is an edge case as we're having slow digest cycles. But using applyAsync / evalAsync is probably a better practice than $timeout?

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

No branches or pull requests

2 participants