↓Skip to main content
Zeitgeist — a spike by Chris Gathercole
  1. Creators/
  2. Simon Willison — Creator of Datasette; co-creator of Django/

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.sampling module for identifying performance bottlenecks, generating flame graphs and source heatmaps for his web-edit app.
  • Profiling revealed that the preserve_endings function, specifically SequenceMatcher.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.