Profiling web-edit with Python 3.15 Reveals Line-Ending Workload Hotspots
Profiling web-edit with Python 3.15: flame graphs and source heatmaps
- Who
- Simon Willison
- What
- demonstrates Python 3.15's built-in sampling profiler on the web-edit app using flame graphs and source heatmaps
What happened
Profiling the unmodified web-edit app with Python 3.15’s built-in `profiling.sampling` found that preserving mixed line endings dominated the editing workload. `preserve_endings` appeared in 64.8% of 15,296 CPU stacks, while `SequenceMatcher.find_longest_match` contributed 38.3% of leaf samples; 95.1% of stacks came from AnyIO’s worker thread, making all-thread sampling essential.
The story so far
Simon Willison demonstrated Python 3.15’s built-in sampling profiler on the unmodified web-edit app, finding that preserving mixed line endings dominated the editing workload. He had GPT-6 Astra Extra High in Codex run the profiler and produce a flame graph and source heatmap. In the profiled workload, `preserve_endings` appeared in 64.8% of 15,296 CPU stacks, while `SequenceMatcher.find_longest_match` accounted for 38.3% of leaf samples. AnyIO’s worker thread produced 95.1% of the stacks, making sampling across all threads essential to capturing the work.
Keep reading
Latest daily · Issue 24NVIDIA and AI4Bharat Introduce Nemotron-pretraining-Indic-v1 and an Open Data Generation PipelineTrending now
- 1Meta Releases Muse Spark Open With Mac and Cloud Support, Topping US Open-Weight Index
- 2Google Launches Gemini 4 Argon Globally, Expands Paid Access as Benchmark Results Vary
- 3OpenAI Updates GPT-6 Astra Pro in ChatGPT With Parallel Agents and Faster Responses
- 4Meta’s New Business Terms Raise Dispute Over Website Crawling and AI Training Rights
Tomorrow at 08:00, a briefing like this arrives in your inbox.
The same kind of briefing as the one above: a few stories worth reading. Free. Mail starts after you confirm, and every letter has a one-click unsubscribe. Read a past issue · 2026-10-17
