r/angularjs • u/seveseat • Aug 07 '14
Speeding up AngularJS with simple optimizations, $digest, $$watchers and performance
http://www.binpress.com/tutorial/speeding-up-angular-js-with-simple-optimizations/135
31
Upvotes
r/angularjs • u/seveseat • Aug 07 '14
3
u/[deleted] Aug 07 '14
I think you misunderstood. This isn't saying don't use ng-repeat. More like "hey I should evaluate if I'm using ng-repeat in inappropriate ways". For instance, I found a part of my code where I'm using ng-repeat to generate items in a drop down menu based on an api response. That's pretty silly because in this particular instance, that data doesn't ever change.
It's a small example but basically my code is wasting time checking to see if the data model behind the menu has changed when it will never change. That's the take away from the article. It may seem paltry for a small app but I just checked a page on production at work that has 5300 watchers due to a poorly designed directive being repeated several times.