- /
- Creators/
- Simon Willison — Creator of Datasette; co-creator of Django/
- Profiling web-edit with Python 3.15: flame graphs and source heatmaps/
Profiling web-edit with Python 3.15: flame graphs and source heatmaps
Blog · Watch/Read · (gathered 2026-10-14)
- Simon Willison demonstrated the efficacy of Python 3.15’s new built-in
profiling.samplingmodule for identifying performance bottlenecks, generating flame graphs and source heatmaps for hisweb-editapp. - Profiling revealed that the
preserve_endingsfunction, specificallySequenceMatcher.find_longest_match, was the dominant bottleneck, appearing in 64.8% of CPU stacks during a busy editing workload. - A critical finding was the necessity to sample all threads, as 95.1% of the recorded CPU stacks originated from AnyIO’s worker thread, highlighting that main-thread-only profiles can miss significant performance issues in async applications.
- The new Python 3.15 profiler, even when run by GPT-6 Astra Extra High in Codex, provides deep insights into application performance, making it a valuable tool for developers.