performance - Concurrent watches in AngularJS app -
currently, developing angularjs application , stuck @ finishing .
in order improve performance of application , reduce memory consumption, thinking limit number of watch on page.
is there recommended limit in angularjs app concurrent watch have best performance of application?
to reduce memory consumption , improve performance idea limit number of watches on page 2,000. utility called ng-stats can track watch count , digest cycles.
jank happens when application cannot keep screen refresh rate. achieve 60 frames-per-second, have 16 milliseconds code execute. crucial scope digest cycles short possible application responsive , smooth. memory use , digest cycle performance directly affected number of active watches. therefore, best keep number of watches below 2,000. open-source utility ng-stats gives developers insight number of watches angular managing, frequency , duration of digest cycles on time.
caution: wary of relying on “single magic metric” golden rule follow. must take context of application account.
the number of watches basic health signal. if have many thousands of watches, or worse, if see number continue grow interact page. strong indications should under hood , review code.
here sources:
https://github.com/kentcdodds/ng-stats
Comments
Post a Comment