liveBook · Manning

Profiling

As explained in Fast by Default

Profiling is the measurement and analysis of a program's execution behavior and resource usage to reveal performance problems.

Profiling measures and analyzes execution behavior and resource usage to make performance problems visible before code ships. It complements performance budgets: budgets define targets, while profiling shows whether a change exceeds them. Integrating profiling into development and review keeps fixes small, clear, and accountable. section 7.0

Use a repeatable profiling loop:

  • Profile after writing or modifying code against the relevant performance budget. section 7.0
  • Investigate the measured hotspot, resource growth, or blocking work. section 7.0 section 7.4
  • Fix the cause, profile again, and move the change to review only when it meets its budget. section 7.0
  • Repeat measurements across the device tiers users actually have, including the cheapest supported device. section 7.3.5
Table 7.1 Web profiling concerns, tools, and diagnostic patterns
Concern
Primary tool
What to look for
Loading performance
Network panel
Large bundles (over 200KB compressed), long dependency chains, render-blocking resources, and missing cache headers
Runtime behavior
Performance panel
Long tasks (over 50ms), layout thrashing, expensive paints, and poor Core Web Vitals scores
Memory stability
Memory panel
Growing heap size across navigations, detached DOM nodes, and event listeners that accumulate

Use browser profiling panels to separate loading, runtime, and memory problems: inspect network size and dependencies, long tasks and rendering, then heap growth and retained DOM or event listeners. section 7.1

A realistic desktop workload

A photo editor's batch export works in under 30 seconds for 10 images, but profiling a realistic 200-image queue exposes behavior that small tests can hide. Choose tools according to the architecture: platform profilers for WPF, AppKit, or GTK; Qt Creator alongside platform tools for Qt; and browser plus host-process profilers for Electron or Tauri. section 7.4

How Fast by Default covers it

How deep it goes
Explains a measure-investigate-fix-remeasure workflow and maps concerns to tools, but does not detail profiler internals.
Examples
Uses browser panels, a desktop photo-export queue, and profiling on flagship, mid-range, and budget devices.
What it assumes
Assumes performance budgets and ordinary development workflows, while teaching how to measure changes against those targets.
What you can do after
Diagnose loading, runtime, memory, CPU, and rendering problems with browser tools, platform profilers, and device testing services.
How it connects
Connects profiling to performance budgets, browser developer tools, memory behavior, desktop profilers, and device tiers.

Also explained in

Compare how 15 books explain profiling →

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.