user2080105
user2080105

Reputation: 1686

Angular 2 performance issue because of binding watch cost

Official Angular 2 documentation supports binding (not one time binding) for all official code snippets. I have noticed that 90% of cases we don't need to watch values once rendered since we are sure it will never changed. this 90% of cases watchers are making longer cycles which makes user experience slower. Is there a way to make one time binding ? if it is possible why is it so unpopular and official documentation don't talk about it despite the big benefit regarding performance ?

Upvotes: 0

Views: 159

Answers (1)

Adnan A.
Adnan A.

Reputation: 1982

Are you looking for ChangeDetectionStrategy?

There are certainly ways to optimize the performance, but most of the examples never work with the apps of the such scale where those optimizations would be required.

I would recommend reading this great blog post about change detection in Angular 2 to get a better picture.

Upvotes: 1

Related Questions