# Python 3.15 profiler shows line-ending preservation dominating web-edit workload

> Original title: Profiling web-edit with Python 3.15: flame graphs and source heatmaps

- Source: Simon Willison
- Published: 2026-10-12T16:58:00.000Z
- Bad Influence: https://badinfluence.news/items/rds7aqlhznie2oulhguf80cym
- Original: https://simonwillison.net/2026/Oct/12/python-3-15-web-edit-profiling/

## Summary

Profiling the web-edit app with Python 3.15's built-in profiling.sampling found that preserve_endings appeared in 64.8% of 15,296 recorded CPU stacks, with SequenceMatcher.find_longest_match accounting for 38.3% of leaf samples. Simon Willison says sampling all threads was essential, since 95.1% of stacks ran in AnyIO's worker thread, which a main-thread-only profile would have missed. He used GPT-6 Astra Extra High in Codex to run the profiler and generate flame graph and heatmap demos.
