Performance Cheat Sheet for Angular Projects

Hasan Beheshti
1 min readMay 24, 2020

1- Unsubscribe not needed subscriptions of all observables in app, especially after disposing components (on ngOnDestroy hook).

2- Using trackBy in NgFor

3- Add Images and Some other URLs to cache urls in PWA configs

4- Detach manually “Change Detection” if not necessary

5- Use TinyPng Library for Minimizing Images, This is VS Code Extension

6- Use Web Workers

7- Use “Indexed DB” and “Sql.js” instead of always fetching data

--

--