liveBook · Manning

Snapshot comparison

As explained in Fast by Default

Snapshot comparison is a technique that compares recorded program states at different times to identify changes in resource usage.

Snapshot comparison identifies resource growth by recording application state at defined points and comparing the results. For long-running desktop applications, use extended sessions and strict limits because users may notice degradation only after hours of use. section 7.4.1

A practical workflow is:

  • Establish a startup baseline, then capture snapshots after one and four hours of representative use. section 7.4.1
  • Compare growth against an explicit resource budget and correlate unexplained increases with user actions. section 7.4.1
  • Repeat the workflow after remediation to verify that resources are released before the next operation. section 7.4.1

200-image export

An export begins at 180MB and reaches 2.1GB after 150 images, exceeding the 400MB budget. Snapshot evidence shows undo history retaining original images; clearing that history stabilizes usage near 250MB. section 7.4.1

How Fast by Default covers it

How deep it goes
Explains baseline timing, interval comparison, budgets, remediation, and verification without detailing profiler internals.
Examples
Uses a 200-image export measured from 180MB to 2.1GB and back to stable usage near 250MB.
What it assumes
Assumes representative long-running usage, a measurable resource budget, and familiarity with platform profiling tools.
What you can do after
Diagnose memory growth with Visual Studio Memory Usage, dotMemory, Xcode Instruments, and lightweight interval logging.
How it connects
Connects memory profiling with memory leaks, undo history, resource reclamation, and application logging.

Also explained in

Compare how 4 books explain snapshot comparison →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fast by Default. The section links point to the parts of the book it draws on.