I've built a large AngularJS
application that performed fine on until now.
My problem started when some users(with very old puters that have one CPU) plained about the application being extremely slow.
I've opened the task manager and I can see that the tab is on 70% - 100% CPU always(When using a single core CPU).
Now since this works great on stronger puters, I'm not sure I have a performance issue and if I do, I don't really know how to check this(I can't check this with performance tools on chrome).
Is there any way to handle this? To tell Angular
to perform it's digest cycles less times?
Has anyone encountered a similar issue? Any tip will be great for me.
I've built a large AngularJS
application that performed fine on until now.
My problem started when some users(with very old puters that have one CPU) plained about the application being extremely slow.
I've opened the task manager and I can see that the tab is on 70% - 100% CPU always(When using a single core CPU).
Now since this works great on stronger puters, I'm not sure I have a performance issue and if I do, I don't really know how to check this(I can't check this with performance tools on chrome).
Is there any way to handle this? To tell Angular
to perform it's digest cycles less times?
Has anyone encountered a similar issue? Any tip will be great for me.
- Maybe this will help? github./angular/angular.js/issues/1534 – c97 Commented Sep 3, 2014 at 10:24
- Thanks for your answer. The problem is with the single CPU rather than IE8. I'll edit my question to be more clear. – Amir Popovich Commented Sep 3, 2014 at 10:26
1 Answer
Reset to default 6I have never seen ways to reduce the number of times cycles are called.
However there are several ways to improve the performance of your application.
First, to have an idea of the performance from your puter you may install Batarang which provide a tab for performance analysis.
Once you have this you may focus on the following:
- Disable the watchers that won't be use anymore
- Avoid ng-repeat if possible and/or use the bindonce directive
- Use pagination to have smaller sets of data
For more details you may refer to the following articles:
- https://www.exratione./2013/12/considering-speed-and-slowness-in-angularjs/
- https://coderwall./p/d_aisq
- http://www.slideshare/JohnMeiss/10-astuces-pour-ameliorer-les-performances-de-son-application-angularjs-ngparis-meetup-11-meetic (Part of it is in French)