{"guid":"56a94d75-ee89-438f-9856-5b5b9d84a981","title":"Profiling Python: From cProfile to Sampling","subtitle":null,"slug":"sps26-110866-profiling-python-from-cprof","link":"https://talks.python-summit.ch/swiss-python-summit-2026/talk/WJCKGM/","description":"Python developers have long faced a frustrating tradeoff: the more precisely you measured performance, the more you risked changing it.\n\nTraditional profilers like `profile` and `cProfile` trace every function call, providing exact call counts and instrumented timings at the cost of significant overhead.\n\nThe ecosystem fought back. Tools like `py-spy` and `austin` embraced statistical sampling, attaching to running processes and gathering useful insights with minimal impact. Yet statistical sampling remained outside the Python standard library.\n\nPython 3.15 changes that.\n\nThe new `profiling.sampling` module, also known as Tachyon, brings statistical profiling into the standard library, building on years of community experimentation.\n\nIn this talk, we'll compare tracing and sampling profilers, exploring how each approach works, where it struggles, and how sampled stacks become flame graphs.\n\nBy profiling the same code with different tools, we'll see how each profiler reveals a different picture of performance - and why choosing the right tool matters.\n\nProblem Statement: Most Python developers reach for `cProfile` because it's built in, often without realizing its limitations or knowing modern alternatives exist. Sampling profilers have been available for years, but many developers have not encountered them. This talk closes that gap.\n\nAttendees will leave knowing: Deterministic vs statistical profiling and why it matters, When `cProfile` helps - and when it can mislead, How and when to use Python 3.15's `profiling.sampling`, How to choose the right profiler for the job.","original_language":"eng","persons":["Farid Mirzayev"],"view_count":2,"promoted":false,"date":"2026-10-22T16:30:00.000+02:00","release_date":"2026-11-11T00:00:00.000+01:00","updated_at":"2026-11-12T03:45:05.172+01:00","tags":["110866","2026","sps26","Python, the programming language you love","Aula","sps26-eng"],"length":1743,"duration":1743,"thumb_url":"https://static.media.ccc.de/media/conferences/sps26/110866-56a94d75-ee89-438f-9856-5b5b9d84a981.jpg","poster_url":"https://static.media.ccc.de/media/conferences/sps26/110866-56a94d75-ee89-438f-9856-5b5b9d84a981_preview.jpg","timeline_url":"https://static.media.ccc.de/media/conferences/sps26/110866-56a94d75-ee89-438f-9856-5b5b9d84a981.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/conferences/sps26/110866-56a94d75-ee89-438f-9856-5b5b9d84a981.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/sps26-110866-profiling-python-from-cprof","url":"https://media.ccc.de/public/events/56a94d75-ee89-438f-9856-5b5b9d84a981","conference_title":"Swiss Python Summit 2026","conference_url":"https://media.ccc.de/public/conferences/sps26","related":[],"recordings":[{"length":1743,"mime_type":"video/mp4","language":"eng","filename":"import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2026-11-11T03:57:48.922+01:00","label":"eng 1080p","size":104,"recording_url":"https://cdn.media.ccc.de/events/sps26/h264-hd/import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_hd.mp4","url":"https://media.ccc.de/public/recordings/107339","event_url":"https://media.ccc.de/public/events/56a94d75-ee89-438f-9856-5b5b9d84a981","conference_url":"https://media.ccc.de/public/conferences/sps26"},{"length":1743,"mime_type":"audio/opus","language":"eng","filename":"import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2026-11-11T04:46:40.369+01:00","label":"eng","size":16,"recording_url":"https://cdn.media.ccc.de/events/sps26/opus/import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_opus.opus","url":"https://media.ccc.de/public/recordings/107379","event_url":"https://media.ccc.de/public/events/56a94d75-ee89-438f-9856-5b5b9d84a981","conference_url":"https://media.ccc.de/public/conferences/sps26"},{"length":1743,"mime_type":"video/mp4","language":"eng","filename":"import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2026-11-11T04:46:33.360+01:00","label":"eng 576p","size":48,"recording_url":"https://cdn.media.ccc.de/events/sps26/h264-sd/import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_sd.mp4","url":"https://media.ccc.de/public/recordings/107377","event_url":"https://media.ccc.de/public/events/56a94d75-ee89-438f-9856-5b5b9d84a981","conference_url":"https://media.ccc.de/public/conferences/sps26"},{"length":1742,"mime_type":"audio/mpeg","language":"eng","filename":"import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2026-11-11T04:46:36.964+01:00","label":"eng","size":27,"recording_url":"https://cdn.media.ccc.de/events/sps26/mp3/import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_mp3.mp3","url":"https://media.ccc.de/public/recordings/107378","event_url":"https://media.ccc.de/public/events/56a94d75-ee89-438f-9856-5b5b9d84a981","conference_url":"https://media.ccc.de/public/conferences/sps26"},{"length":1743,"mime_type":"video/webm","language":"eng","filename":"import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2026-11-11T05:47:03.493+01:00","label":"eng 576p","size":65,"recording_url":"https://cdn.media.ccc.de/events/sps26/webm-sd/import-110866-eng-Profiling_Python_From_cProfile_to_Sampling_webm-sd.webm","url":"https://media.ccc.de/public/recordings/107425","event_url":"https://media.ccc.de/public/events/56a94d75-ee89-438f-9856-5b5b9d84a981","conference_url":"https://media.ccc.de/public/conferences/sps26"}]}