iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
If an Angular interaction feels slow, profile a representative interaction before changing code. A template expression or lifecycle hook that takes too long can hold up the change-detection cycle because Angular evaluates applicable work synchronously and sequentially. Use Angular DevTools to find the component or hook consuming time, then optimize that measured bottleneck.
What makes a computation slow down Angular?
During change detection, Angular evaluates applicable template expressions and selected lifecycle hooks. That work runs synchronously, so one expensive computation can delay the rest of the cycle. The issue may be an inefficient algorithm, repeated derivation, or costly DOM work—not necessarily change detection across the whole application.
This guidance concerns runtime work associated with change detection. Slow initial loading is a different problem; Angular discusses measures such as deferred loading, image optimization, and server-side rendering separately in its performance overview.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsHow to locate the bottleneck with Angular DevTools
- Reproduce the delay with a representative interaction in the application.
- Open Angular DevTools and record the interaction in the Profiler.
- Select a change-detection cycle, then inspect its component or directive chart or flame graph.
- Use the cycle details to identify the component, template evaluation, or hook taking the most time. The profiler reports cycle time and can estimate frame rate when it falls below 60 frames per second.
- Optimize the specific measured work, then record the same interaction again to assess the change.
Angular’s profiler documentation explains how to record and inspect change-detection cycles. Its documentation illustrates a cycle taking over 573 ms, with over 297 ms spent evaluating EmployeeListComponent’s template. Those figures belong to that worked example; they are not a benchmark or an expected result for other applications. See Angular’s slow-computation guidance.
#1 Best Overall
Choose a fix that matches the measured work
Angular recommends improving the underlying algorithm first. Caching can help when a computation is repeated, but the right choice depends on how its inputs change and what results it retains.
| Approach | When it fits | Behavior and trade-off |
|---|---|---|
| Improve the algorithm | The measured calculation does more work than necessary. | Recommended starting point; reduces the cost of the computation itself. |
| Pure pipe | A template transformation should be reused until its inputs change. | Angular recomputes a pure pipe when it detects changed inputs. |
| Memoization | The same arguments recur and retaining corresponding results is useful. | Can retain multiple argument/result pairs; memory use may become significant if frequently called with many distinct arguments. |
| Computed signal | A costly derived value depends on signal state. | Lazy and memoized: Angular caches the derivation after evaluation and invalidates it when a tracked dependency changes. |
| Change-detection scope or frequency | Profiling shows broad or excessive change-detection work rather than one dominant expression. | Investigate runtime-performance techniques such as OnPush subtree skipping, zoneless change detection, or zone pollution. |
Use computed signals for derived signal state
A computed signal is a suitable place for expensive derivations, such as filtering an array, when the inputs are signals. The value is evaluated lazily, cached after evaluation, and recalculated when a tracked dependency invalidates it. See Angular’s signals guide.
Rank #2
Keep effects for imperative synchronization
Use effects to synchronize signal state with imperative APIs that do not use signals. For derived values, Angular recommends computed() or linkedSignal(); using effects to propagate state changes can trigger unnecessary change-detection cycles. See Angular’s effects guidance.
When DOM work is the slow computation
DOM access can be costly when it causes repeated layout calculations, repaints, or reflows. Avoid putting unnecessary DOM reads or mutations in recurring lifecycle hooks. If custom DOM work is required, Angular’s afterRenderEffect provides phases for grouping operations so layout reads and writes can be coordinated and layout thrashing avoided. See Angular’s guidance on effects and render effects.
Rank #3
When the problem is broader than one expression
If the profiler points to widespread or excessive change detection rather than one expensive calculation, consult Angular’s runtime performance guidance for options including OnPush subtree skipping, zoneless change detection, and zone pollution.
Version context matters: Angular’s overview says zoneless change detection is the default for new applications in Angular v21 and later. Verify the target application’s version and migration context before applying version-specific advice.
Quick Recap
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.

