Skip to content

diagnostic · one of 50 free, no counter

Leak sniff

Does this page keep growing every time I open and close something?

A dialog that leaves a copy of itself behind every time it closes is invisible until the tab has been open all afternoon. This takes a baseline of the document - elements, inline handlers, style tags, iframes and, in Chromium, the JS heap - then counts again each time you repeat the action you suspect, up to three rounds, and says whether the page grew every time, never, or some of the time.

Reach it Press ⌘ + K on any tab and type leak sniff. Ctrl + K on Windows and Linux

A baseline, the same action three times, and whether the page kept growing
counts elements, inline handlers, style tags, iframes
heap Chromium only, quantised, moves with GC
rounds a baseline and up to three
verdict a signal, never proof of a leak
observes nothing - it counts when you press
sends nothing
section#about

What this actually is

When a single-page app gets slower the longer it stays open, after building a modal, a drawer or a route that mounts and unmounts, or before profiling, to decide whether a heap snapshot is worth taking at all. It is the quick question before the slow tool, not a replacement for the memory panel.

section#asked

Asked about this diagnostic

If it says the page grew in all three rounds, is that a leak?

Not on its own. A list that loads more each time, a cache that fills and an animation that adds nodes all grow a page on purpose, and the heap only falls when the garbage collector happens to run. Growth every round is a reason to take a heap snapshot and look; the tool words its verdict that way and never calls anything a leak.

If it says the page held steady, am I clear?

Clear of growth in these counts, not of a leak. Detached nodes held by a closure, listeners added from script and objects kept in a module-level array are invisible from a page, and that is exactly where most real leaks live. Steady counts narrow the search; they do not end it.

Why does Firefox show no heap figure?

Because the figure comes from performance.memory, which only Chromium exposes to a page, and even there it is rounded so that it cannot be used to fingerprint the machine. Where it is missing the element and handler counts carry the reading on their own.

how to use leak sniff

  1. Open Leak sniff and press Take baseline before touching anything.
  2. Repeat the action you suspect - open and close the dialog, leave the route and come back.
  3. Press Compare after each repetition, up to three rounds.
  4. Growth in every round is the cue for a heap snapshot in devtools, not a verdict.