Performance Optimization in Angular
Performance is always a concern in any product that you build for end users. It is a critical element in increasing the chances of someone using your app for the first time becoming a customer. Now, we can’t really improve an app’s performance until we identify potential possibilities for improvement and the methods to achieve this. In this chapter, you’ll learn some methods to deploy when it comes to improving Angular applications. You’ll learn how to analyze, optimize, and improve your Angular app’s performance using several techniques. Here are the recipes we’re going to cover in this chapter:
- Using
OnPush
change detection to prune component subtrees - Detaching the change detector from components
- Running
async
events outside Angular withrunOutsideAngular
- Using
trackBy
for lists with*ngFor
- Moving heavy computation to pure pipes
- Using web workers for heavy computation...