admin管理员组

文章数量:1323381

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.

Share Improve this question edited Sep 3, 2014 at 10:26 Amir Popovich asked Sep 3, 2014 at 10:13 Amir PopovichAmir Popovich 29.8k9 gold badges57 silver badges101 bronze badges 2
  • 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
Add a ment  | 

1 Answer 1

Reset to default 6

I 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:

  1. Disable the watchers that won't be use anymore
  2. Avoid ng-repeat if possible and/or use the bindonce directive
  3. 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)

本文标签: javascriptAngularJSSingle Core CPUAlmost 100 CPUStack Overflow