I'm trying to debug an AngularJS website to improve performance of the load time. At the moment the browser freezes for 1-2 seconds on the first load with no caching.
From reading various posts I learned that watchers are often the biggest problem for performance in AngularJS apps.
Here is a screenshot from batarang:
But, how many is too many watchers? 7k~ is a lot, but is that too many?
When debugging in the Chrome console CPU profile, I have a hard time figuring out what calls h - k - z.onload and in general how to improve performance besides having less watchers:
I know it's a broad question, but I'm looking for any performance tips for AngularJS.
Angular start to hit the performence wall when having more then 2000 watchers.
If you have 7K+ watchers in your app, it is due to bad design.
see here https://coderwall.com/p/d_aisq/speeding-up-angularjs-s-digest-loop and here How does data binding work in AngularJS?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With