DigestAI news desk

Cut through the AI noise.

Research1 min read

Python 3.15’s profiler finds line-ending code dominates web-edit app

Simon Willison profiled a Python 3.15 web-edit app using built-in sampling tools. The app’s preserveendings feature consumed 64.8% of CPU time across 15,296 recorded stacks, with SequenceMatcher.findlongestmatch accounting for 38.3% of leaf samples. Sampling all threads was critical, as 95.1% of stacks originated from AnyIO’s worker thread, which would have been missed by profiling only the main…

1 source

Key points

  • Python 3.15’s profiler shows `preserve_endings` uses 64.8% of CPU in web-edit app
  • `SequenceMatcher.find_longest_match` takes 38.3% of leaf samples in profiling data
  • AnyIO’s worker thread accounts for 95.1% of CPU stacks, requiring full-thread sampling

Willison also used GPT-6 Astra Extra High in Codex to generate flame graphs and heatmaps for the app. The results highlight inefficiencies in line-ending handling, suggesting potential optimizations for the web-edit workflow.

Full story from Simon Willison · by Simon WillisonOpen source ↗

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

Simon Willison · 12 October 2026

Loading the full article…

This text was published by Simon Willison and written by Simon Willison. It is reproduced here with attribution so you can read it in full; the rights remain with the publisher. Read it at the source ↗

Topics · follow one to build your own front page

The headline, key points and digest above were generated by Digest AI's editorial model from the linked sources. Automated summaries can contain errors: the sources are the record. Spotted a mistake? Tell us. Published by Martin K., who runs Digest AI and handles corrections.

Comments

via GitHub Discussions

More in Research

All →

Related stories