angular animate producing very slow behavior behavior on ng-repeat

1,642 views
Skip to first unread message

Joe Gaudet

unread,
Sep 19, 2013, 5:49:45 PM9/19/13
to ang...@googlegroups.com
Hey All,

I have a table with about 200 rows generated by ng-repeat - which works just fine when I don't include the new angular animation stuff.

However when I do it causes a recalculate style per row of the table, which when it adds together slows down the rendering considerably. This is caused by removing the ng-enter class.

My template is here:


Is there a way to disable animations for tables?  I don't have a single ng-enter or enter class defined in my project.

Any thoughts ? 

.joe

--
.joe out.

CTO & Co-Founder Learndot.

Ivan Reese

unread,
Feb 20, 2014, 9:16:37 PM2/20/14
to ang...@googlegroups.com
I think I'm experiencing the same issue. I'm rendering about 400 items in an ng-repeat, and simply including the ngRepeat module slows filtering the repeat to a crawl. I've removed all animated classes, and it's still sluggish. It seems to update one element at a time, taking about .3 seconds for each. If I wiggle the mouse around on the elements, they update faster.

Ivan Reese

unread,
Feb 20, 2014, 9:28:10 PM2/20/14
to ang...@googlegroups.com
Found the cause of my issue.

I had a css transition applied to an element inside my ng-repeat (a little glow on hover for an <a> tag). It wasn't attached to any of the classes related to angular animation, like ng-enter or ng-move. However, the presence of this transition causes extremely slow updates when filtering the ng-repeat.

Ivan Reese

unread,
Feb 20, 2014, 9:30:45 PM2/20/14
to ang...@googlegroups.com
To be clear: the transition was applied to the same element as the ng-repeat directive, not a child element. Wrapping the transitioning element in a container, and applying the ng-repeat to the container instead, solved the issue.
Reply all
Reply to author
Forward
0 new messages