Fast Angular apps come from measuring first—bundle analysis, Lighthouse, and Angular DevTools—then applying targeted fixes: OnPush, trackBy, lazy routes, and deferring non-critical UI.
High-impact habits
- Lazy-load feature routes and heavy third-party charts
- Use stable
trackByin*ngForlists - Avoid recreating objects in templates every change detection cycle
- Prefer signals/computed over manual subscription sprawl
What to skip early
Micro-optimizing every component before you have data creates complexity without gains. Profile, find the hot path, fix that.
Important interview questions and answers
- Q: First step when a view feels slow?
A: Measure render cost and bundle size—do not blanket OnPush every component. - Q: Why trackBy?
A: Reuses DOM nodes when collections reorder instead of destroying/recreating rows.
Self-check
- Name two checklist items before adding OnPush.
- How does lazy routing help initial load?
Interview prep
- First performance step in Angular?
Measure with DevTools and bundle analysis before OnPush, lazy routes, or micro-optimizations.