Skip to content
Main Site News Console

Profiling web-edit Performance with Python 3.15: Flame Graphs and Source Heatmaps

· Simon Willison Translated
技巧LLM

ResearchProfiling web-edit with Python 3.15: Flamegraphs and source code heatmaps—Profiling an unmodified web-edit application using Python 3.15’s built-in profiling.sampling revealed that under busy editing workloads, mixed newline preservation dominates: of the 15,296 recorded CPU stacks, preserve_endings appeared in 64.8% of them, with SequenceMatcher.find_longest_match accounting for 38.3% of the leaf samples. Sampling across all threads was critical, as 95.1% of the call stacks originated from AnyIO worker threads, which would have been missed by profiling the main thread alone.

I put the new Python 3.15 profiler through its paces by having GPT-6 Astra Extra High in Codex run it against my new app, web-edit:

I need a Python 3.15 flame graph and heatmap demo of the "web-edit" app from PyPI - research first then make me those demos

Here are the resulting sample flamegraph and heatmap.