# facebook/memlab

A framework for finding JavaScript memory leaks and analyzing heap snapshots

Repository: https://github.com/facebook/memlab
Canonical: https://ross.abutalabs.com/products/memlab
Homepage: https://facebook.github.io/memlab/
Language: TypeScript
License: MIT
License Family: permissive
Topics: facebook, javascript, memory, detector, heap, leak, nodejs, snapshot, v8, e2e, hermes, perf-tools, performance
Last push: 2026-08-26T18:38:16+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 1560, "days_push": 7, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5030, forks 144 (observed 2026-08-28T04:09:08.636357+00:00)

## What it is
MemLab is an end-to-end testing and analysis framework from Meta for detecting JavaScript memory leaks and optimization opportunities. It drives browser scenarios via Puppeteer, diffs heap snapshots, and provides programmatic heap traversal APIs plus a CLI toolbox and MCP server for AI assistants.

## Use cases
- find memory leaks in a web app
- analyze v8 heap snapshots programmatically
- detect detached DOM nodes and event listener leaks
- write memory assertions in node.js unit tests
- find duplicate strings and oversized objects in the heap
- debug memory leaks interactively in the browser
- let AI coding assistants investigate heap snapshots via MCP

## When to choose
- you need automated memory leak detection in browser or node.js apps
- you want to analyze heap snapshots from Chromium, Node.js, Electron, or Hermes
- you want memory regression checks in CI

## When to avoid
- you need CPU or network profiling rather than heap analysis
- you work outside the JavaScript ecosystem

## Facets
- artifact type: framework
- maturity: active
- function: testing, e2e-testing, monitoring, benchmarking, developer-tools, cli, mcp
- domain: developer-tools, web-development, testing, performance, frontend
- platform: cli, cross-platform
- tags: memory-leak-detection, heap-snapshot-analysis, puppeteer, v8, hermes, electron, memlens, performance-analysis, nodejs

## Member repositories
- facebook/memlab (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:08.636357+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:27.599558+00:00, confidence not recorded.
  - readme: https://github.com/facebook/memlab (fetched 2026-08-28T04:09:08.636357+00:00, sha 0b29a9bc10aa)
  - homepage: https://facebook.github.io/memlab/ (fetched 2026-08-29T08:58:15.453587+00:00, sha 2223a878f875)
  - registry_npm: https://registry.npmjs.org/memlab (fetched 2026-08-29T08:58:15.456120+00:00, sha 17a7a75f0e2b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
