~/talk

How to Tune your Python Analysis Pipeline: A Profiler Guide

Talkat PyCon Italia 2023 · 2023-05-25..05-28· [python]
slides:none on file

A concrete data‑analysis pipeline shows profiling moving from guessing to fixes: initial run takes ~20s, switching JSON text reads to binary/HDF5 and using NumPy cuts wall time to about 3s and lowers peak memory from ~40 to ~23. Timing and memory bottlenecks come from data loading and list/dict-heavy reductions. Workflow uses cProfile, visualizes with SnakeViz, samples with PySpy and measures CPU+memory with Scalene, demonstrating practical, reproducible gains.

AI-written summary · about

  1. 0:00Introduction to Python profilers
  2. 1:52Profiling vs benchmarking
  3. 3:56Instrumenting vs sampling profilers
  4. 7:27Example pipeline setup
  5. 9:14Benchmarking with time command
  6. 9:56Using cProfile for timing
  7. 11:44Visualizing with SnakeViz
  8. 13:30Optimizing data loading
  9. 14:13Sampling with PySpy
  10. 15:59Analyzing combined stats
  11. 16:20Introducing Scalene profiler
  12. 17:47Memory profiling basics
  13. 18:54Optimizing memory usage
  14. 20:44Using memory profiler
  15. 21:47Summary of Python profilers
  16. 24:55Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.