npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

memoryviewer

v1.2.0

Published

Interactive viewer for .NET heap snapshots (.gcdump.json produced by dotnet-gcdump --format json).

Readme

Memory Viewer

Interactive viewer for .NET managed heap snapshots. It reads the .gcdump.json files written by dotnet-gcdump collect --format json (or dotnet-gcdump convert <file>.gcdump --format json) and runs entirely in the browser, so it can be embedded in tools such as VS Code webviews or opened standalone.

Please note that this tool was created using Claude Code and Fable 5.1.

DotRush also creates original .gcdump files, which can always be opened in another editor.

Views

  • Summary – heap types with instance count, shallow size and retained size, optionally grouped by assembly or namespace; expand a type to see its instances.
  • Dominators – the dominator tree: each object under the single object that keeps it alive, biggest retained size first. Objects that several places reference sit directly under the root category with a "N referrers" note.
  • GC Roots – static fields, thread stacks and handles, followed along their references.
  • Graph – retention graph of the focused object: retainers layered toward the GC roots above, references below.
  • Leak Suspects – heuristics, most severe first: objects kept alive only by delegates (subscribers of a static event, timer targets, closures in a static list; graded by whether one long-lived owner accumulates them), event handler lists with many subscribers of one type, deep same-type chains, pinned objects, static fields holding the most memory, largest retained objects and collections, crowded types, objects waiting for finalization, the runtime's static storage, unreachable objects. Size alone never ranks above a leak pattern.
  • Compare – type-level diff against a second snapshot of the same process.

The bottom pane shows the selected object's retainers, references, every GC root that reaches it (each with one shortest path) and its dominator chain. The context menu of any row opens the object in the Graph, reveals it in the Dominators view or shows its type in the Summary.

A gcdump does not record which live objects still have a pending finalizer, so objects that were never disposed cannot be told apart from disposed ones; only objects already waiting for the finalizer thread are reported.

What the synthetic nodes mean

dotnet-gcdump adds a few nodes that are not heap objects. The viewer shows them in italics, with readable names, and keeps them out of the type list:

| In the file | Shown as | Meaning | | --- | --- | --- | | [.NET Roots] | GC roots | The starting point of the garbage collector. | | [static vars], [static var T.field] | Static fields, static T.field | One root per static field. The name is the runtime type of the referenced object plus the field name; the declaring class is not recorded. | | [local vars] | Local variables | References on thread stacks and in registers. | | [strong Handles], [pinning Handles], [finalizer Handles], [Dependent Handles] | Strong handles, Pinned handles, Finalizer queue, Dependent handles | GC handles and the finalization queue. | | UNDEFINED | Unknown object | A reference to an address that is not an object in the dump. | | T (Bytes > 10K) | T | The dumper splits big objects into size buckets; the viewer merges them back into the type. | | []c__DisplayClass1_0 | <>c__DisplayClass1_0 | The dumper writes compiler-generated <> as []; the viewer restores it. |

Since .NET 8 the runtime keeps the values of static fields in pinned System.Object[] blocks that are rooted by strong handles, so every static value has two retainers in the dump and the static roots retain nothing. The viewer recognizes those blocks (tagged static storage), drops their duplicate references and recomputes the dominator tree, so that static fields own what they keep alive and the biggest ones show up in the Dominators view and in the Leak Suspects.

Embedding

The page exposes window.memoryViewer:

interface MemoryViewerApi {
    version: string;
    loadFromUrl(url: string, fileName?: string): Promise<void>;
    loadFromText(text: string, fileName: string): Promise<void>;
    loadFromJson(json: unknown, fileName: string): Promise<void>;
    configure(options: {
        /** Hide the file-open buttons when the host provides the data. */
        embedded?: boolean;
        /** Let the host pick a baseline snapshot for the Compare view. */
        pickSnapshot?: () => Promise<{ fileName: string; url?: string; text?: string } | undefined>;
    }): void;
}

Snapshot format (.gcdump.json, version 1)

{
  "version": 1, "creationTool": "dotnet-gcdump", "timeCollected": "...", "processName": "...", "processId": 0,
  "totalProcessWorkingSet": <bytes>, "totalProcessCommit": <bytes>,      // process memory when the dump was taken
  "totalSize": <bytes>, "rootIndex": <node index of "[.NET Roots]">,
  "gcHeapSize": <bytes>,                                 // GC heap after the forced collection (optional)
  "gcGenerationSizes": [gen0, gen1, gen2, loh, poh],      // per generation, same moment (optional)
  "gcSegments":    [{ "start", "end", "gen0End", "gen1End", "gen2End", "gen3End", "gen4End" }, ...],  // optional
  "types":         [{ "name": "System.String", "module": "System.Private.CoreLib.dll" }, ...],
  "nodes":         [typeIndex, size, childCount, ...],   // one triplet per node
  "edges":         [...],                                // child node indexes, grouped per node
  "addresses":     [...],                                // object address per node, 0 for synthetic root nodes
  "dominators":    [...],                                // immediate dominator per node, -1 for the root / unreachable
  "retainedSizes": [...]                                 // size of the node plus everything it dominates
}

License

MIT. The icons are codicons by Microsoft, licensed under CC-BY-4.0; their license ships as codicons.LICENSE.txt next to the build.