Show loading animation for slowscript using AngularJS?

前端 未结 8 546
野的像风
野的像风 2020-12-24 12:08

In angularjs 1.2 operations like filtering an ng-repeat with many rows (>2,000 rows) can become quite slow (>1 sec).
I know I can optimize execution times u

8条回答
  •  天命终不由人
    2020-12-24 12:51

    You could run the filter in another thread using WebWorkers, so your angularjs page won't block.

    If you don't use webworkers the browser could get a javascript execution timeout and stop your angular app completely and even if you don't get any timeout your application freezes until the calculation is done.

    UPDATE 23.04.14

    I've seen a major performance improvement in a large scale project using scalyr and bindonce

提交回复
热议问题