LabscoMCP early access ↗

Profiling has told you where the time goes; this is the catalogue of fixes for each cause — fewer allocations, a tighter memory layout, pooling, caching, garbage-collector settings.

WHEN TO USE

SCOPE

USE FOR

  • Pick the right fix once pprof shows allocations, CPU, or GC pauses dominating.
  • Rule out an external bottleneck, like a slow DB query, before touching Go code.
  • Run one optimization at a time and confirm it with a benchstat comparison.
  • Tune GOMEMLIMIT and GOGC for a service running inside a memory-limited container.

NOT FOR

  • Not for benchmark measurement methodology once you need to prove a fix worked.
  • Not for the debugging workflow behind an already-crashing or hung program.