sincecutoff.com
← all changes

compare_heapsnapshots paginates summary diffs

Introduced 2026-10-15 · score 0.95

HOW TO USE IT

When reviewing a large comparison, call `compare_heapsnapshots` with the two snapshot paths and `pageIdx`/`pageSize`; the summary diff returns the requested class page with indexes and an overall class total.

compare_heapsnapshots({"baseFilePath":"<earlier-snapshot.heapsnapshot>","currentFilePath":"<later-snapshot.heapsnapshot>","pageIdx":0,"pageSize":20})

WHY THIS HELPS

When reviewing a large heap snapshot comparison, retrieve the summary diff in pages and retain the overall class total.

BEFORE THIS CHANGE

Previously, the method returned `HeapSnapshotClassDiff[]`; the release note says the paginated implementation returns classes with an index and an overall total in a `HeapSnapshotDiff` object.

REQUIREMENTS AND LIMITATIONS

  • Version: 1.11.0
  • baseFilePath (required): Path to the earlier, base `.heapsnapshot` file.
  • currentFilePath (required): Path to the later, current `.heapsnapshot` file.
  • pageIdx: Page index for pagination.
  • pageSize: Page size for pagination.
  • classIndex: 0-based index of a summary class; when provided, returns that class's detailed diff.
  • Prerequisite: Requires `--memoryDebugging=true`.
  • Pagination applies to the summary diff; the detailed case is deferred to a follow-up.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card