Episode Details
Back to Episodes
#497: Faster than light profiling
Episode 497
Published 2 months ago
Description
Topics covered in this episode:
- Tachyon: A sampling profiler ships in Python 3.15's stdlib
- Python Workers are now generally available on Cloudflare
- Flet 1.0 - build cross-platform apps in Python
- marimo-book: Build static books from marimo notebooks
- Extras
- Joke
Sponsored by Logfire from Pydantic: pythonbytes.fm/logfire Connect with the hosts
- Michael: Mastodon / BlueSky / X / LinkedIn
- Calvin: Mastodon / BlueSky / X / LinkedIn
- Show: Mastodon / BlueSky / X
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too.
Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.
Michael #1: Tachyon: A sampling profiler ships in Python 3.15's stdlib
- Python 3.15 adds the
profilingpackage per PEP 799:profiling.tracing(where cProfile moved) andprofiling.sampling, the new sampler called Tachyon - py-spy and Austin exist but copy raw interpreter bytes with no API, so every CPython release risks breaking them; one in the stdlib is a contract to stop breaking profilers
- Defaults: 1 kHz, main thread, wall clock, and a
-livetop-like view for poking at a slow server - Output is flexible: pstats,
-flamegraph,-diff-flamegraphagainst a baseline,-heatmapon source lines,-opcodesfor specialized bytecode,-geckofor Firefox Profiler with GIL and GC markers - Profiling modes: wall, cpu, gil (which function is starving my other threads?), and exception, plus
-async-awareto see the task graph instead of justselect(),-all-threads, and-subprocessesforking a profiler per child - Near-zero overhead for production; guidance is 10-30 second windows on representative load, and free-threaded builds divide the rate by thread count
- Attach to a running PID, same minor version only; ptrace permissions are the main friction. A 3.14 backport already exists on GitHub