Finding a Needle in the Haystack - Debugging Performance Issues
summary
Practical debugging steps for Sev1 slowness using Python profilers with concrete results: deterministic profilers (cProfile) and sampling tools (py-spy, pyinstrument) plus memory tools (memory_profiler, tracemalloc, mprof, Memray) and flame graphs. Shows how to attach to PID and get a hot line without restarts, how replacing string concatenation with join cuts time and memory, a real incident where a regex running a million times was the culprit, a boot-up delay from an accidental class variable, and a costly double marshalling that spikes GC.
AI-written summary · about
chapters (15)
- 0:00Introduction and speaker intro
- 1:47Speaker background and context
- 3:12Performance issues analogy
- 5:21Importance of performance testing
- 6:27What is profiling
- 8:37Deterministic profilers
- 11:31Sampling profilers
- 14:06Memory profiling importance
- 17:00Memory profiling tools
- 20:41Garbage collection impact
- 23:39Real-world debugging examples
- 27:59LLMs and debugging context
- 28:43Key takeaways summary
- 29:26Final advice and credits
- 29:50Q&A session
