Driving Down The Memray Lane
summary
Shows how memray Jupyter extension profiles real Python workloads, tracing allocations inside pandas and the Python allocator; a traced run exposes a 1.4 GB peak inside pandas internals and lets the author compare two grouping strategies that measure 5.4 MB vs 5.5 MB snapshots. Demonstrates generating HTML flamegraphs from notebook cells, explains why Windows isn’t supported, and emphasizes reading roofs (self allocation) versus children allocations to find where memory is actually held and which lines to change.
AI-written summary · about
chapters (11)
- 0:00Introduction and setup
- 1:12What is memory profiling
- 6:58Why profile memory usage
- 8:55Memory types and allocation
- 11:36Python memory management
- 14:00Introducing Memray tool
- 14:49Memray demo basics
- 18:17Interpreting frame graphs
- 21:03Real-world pandas demo
- 26:00Tool limitations and conclusion
- 27:22Q&A session
