How to optimize the Angular app?- expert level angular interview question

Anil Kumar
Mar 6, 2024

--

Here are points will help you to improve the performance

  1. AOT- Ahead of time compilation
  2. Tree shaking — Remove unused code
  3. Lazy loading — Load on demand,
  4. Change Detection to onPush — Performance will not run unnecessary life cycle
  5. Pure pipes-Performance will not run unnecessary life cycle
  6. Immutable data — Performance will not run unnecessary life cycle
  7. Avoid expensive operation in html template-Performance will not run unnecessary life cycle
  8. wisely use NgZone -Performance will not run unnecessary life cycle
  9. Lesser no of request — memory and Performance will not run unnecessary life cycle
  10. Reducing size if image and assests
  11. Use caching server , Server side, client side
  12. Minimize thirdparty lib
  13. DRY No duplicate code
  14. foor loop use trackby
  15. Signals
  16. Web workers
  17. Use CDN
  18. Unsubscribe

--

--

Anil Kumar
Anil Kumar

Written by Anil Kumar

Software Engineer| Angular Advocate | Cyclist

No responses yet