-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ng-animation slowly with ng-repeat #12678
Comments
We do have a fix that does speed this up at least twice for 1.4.5 (slowly) (somewhat faster) Once 1.4.5 is out later this week we can look into speeding up. |
Hi @matsko |
Yes exactly. There will be an effort to speed this up post 1.4.5. |
Hi @matsko I am looking forward this coming release. |
This is unfortunately still slow, even in 1.5. Most of the time is lost in the loop that determines if an element is animatable. For that, it needs to make sure a) the element and its parents have $animate.enabled(true), b) the element is a child of the body and c) the element is a child of the app $rootElement. In an ngRepeat, this is done for each element, which takes a while.
|
Sorry, $animate.enabled(e, false) on the repeated element doesn't actually work because of ngRepeat / transclusion. |
@Narretz I'm rendering angular components with jsdom, and calls to $animate seem to be taking the most time. Is there any way to tell angular that no elements animate? |
@graingert Different ways, actually: https://code.angularjs.org/snapshot/docs/guide/animations#how-to-selectively-enable-disable-and-skip-animations Does this help? |
Hello
I have a array that contain 500 items.First time it render by ng-repeat is faster but when it get data from backend server again that render slowly. I try some tip from other site suggestion like used 'track by'.But it cannot be improve.
Finally I used chrome profile tool record to find out .As below photo.The root cause seems by ng-animate.When I remove ng-animate from module the render time from 4300 ms to 100 ms.

example
slowly ng-repeat
faster ng-repeat
ps: For second plunkr I just remove ng-animate from module
Please help the Issue,thank you very much.
The text was updated successfully, but these errors were encountered: