Go back to overview

Strategy for debugging performance regressions in Go

May 19, 2023

You want to reason about the problem and test your hypothesis and trade-offs.

  1. Identify: Use benchmarking tests identify and measure the performance regression or runtime pprof tools to create a callgraph of the executable with the given dataset that is problematic.
  2. Hypotheses: Based on the benchmarks or callgraph, find out what you think is the cause of the regression.
  3. Test: Isolate (if possible) the problematic code, create a minimal reproducible example, and test using pprof.
  4. Evaluate and share: Record your process, findings, and share results.

This can be translated into practical steps using go tools and related libraries.