Angular Performance Optimisation and Memory Leak Fixes

Does your Angular application feel sluggish, get slower the longer it is used, or crash in certain situations? I measure where time and memory are actually lost, fix the root causes and make sure the problems don't come back.

How performance problems show up

Performance problems in Angular rarely come from a single line of code. Usually many small decisions add up – until lists stutter, forms react with a delay or the browser tab uses several hundred megabytes after a working day.

Typical causes in Angular applications

Too much change detection

With the default strategy, Angular potentially checks the whole component tree on every event, timer or HTTP response. Missing OnPush, function calls in templates and frequent events not moved out via NgZone.runOutsideAngular multiply the effort.

RxJS subscriptions that never end

Subscriptions that aren't closed when a component is destroyed – e.g. without the async pipe, takeUntilDestroyed or toSignal – keep components, DOM nodes and data in memory. This is the most common source of memory leaks.

Other memory leaks

Manually registered event listeners, setInterval timers, third-party libraries that don't clean up, or ever-growing caches in services lead to detached DOM nodes and a steadily growing heap.

Inefficient rendering of large data sets

Lists without a track expression (or trackBy), missing virtualisation and computations in templates make Angular rebuild far too much DOM on every change.

State management without memoisation

NgRx selectors that create new objects on every call, or complex derivations without createSelector or computed(), trigger rendering even though nothing has changed.

Oversized bundles

Missing lazy loading of routes, no @defer for heavy components and unused dependencies increase load time – especially on mobile devices.

My approach

  1. Measure, don't guess

    I reproduce the problems and measure with Angular DevTools (profiler), Chrome DevTools (performance recording, heap snapshots, allocation timeline) and Lighthouse. This shows which components render how often and which objects are never released.

  2. Prioritise root causes

    I rank the findings by impact and effort, so you can see which measures have the biggest effect – and which aren't worth it.

  3. Fix in a targeted way

    Typical measures: introducing OnPush and signals, securing subscriptions with the async pipe, takeUntilDestroyed or toSignal, memoising selectors, optimising lists with track and virtual scrolling, lazy loading routes and components.

  4. Verify and safeguard

    Every measure is checked with the same measurements as at the start. Build budgets, lint rules and tests help keep the problems from creeping back in.

Service & price

Performance analysis, memory leak fixes & stabilisation

On request

  • Performance analysis and optimisation in Angular
  • Identification and resolution of memory leaks
  • Stabilisation of Angular applications
Enquire

Would you like a complete assessment with a written report first? Then the Web Application Audit is the right place to start.

What clients say

Mr Birke was instrumental in the design, development, and stabilisation of our system. In collaboration, Mr Birke demonstrated a very reliable, independent, and transparent working style. I recommend Fabian Birke unreservedly for MedTech and HealthTech projects.

Joshua Norton Technical Project Lead, LAP Laser GmbH

Angular performance FAQ

How do I recognise a memory leak in my Angular app?

A typical sign is a heap that keeps growing with repeated navigation and doesn't drop after garbage collection. A heap snapshot in Chrome DevTools then often shows detached DOM nodes or component instances that should have been destroyed long ago.

Should we switch everything to OnPush?

OnPush makes sense for most components, but it requires immutable data or signals. Switching everything without adapting data flows can lead to views that no longer update – so I do it selectively.

Do we have to rebuild the whole app to use signals?

No. Signals can be introduced step by step and connected to existing RxJS code via toSignal and toObservable. I start where the effect on rendering is biggest.

Related services

Let's talk about your performance problems

Briefly describe what you're seeing – I'll tell you how I would narrow down the cause.