{
  "@context": "https://schema.org",
  "@id": "https://aggr.aymericbeaumet.com/items/simonwillison-net/2026-10-12-profiling-web-edit-with-python-3-15-flame-graphs-and-source/#webpage",
  "@type": [
    "WebPage",
    "ArchiveComponent"
  ],
  "articleBody": "[Profiling web-edit with Python 3.15: flame graphs and source heatmaps](https://github.com/simonw/research/tree/main/python-3-15-web-edit-profiling#readme) — Profiling the unmodified web-edit app with Python 3.15’s built-in \\`profiling.sampling\\` revealed that mixed line-ending preservation dominated a busy editing workload: \\`preserve\\_endings\\` appeared in 64.8% of 15,296 recorded CPU stacks, with \\`SequenceMatcher.find\\_longest\\_match\\` contributing 38.3% of leaf samples. Sampling all threads was essential, since 95.1% of stacks came from AnyIO’s worker thread and would have been missed by a main-thread-only profile.\n\nI put the [new Python 3.15 profiler](https://simonwillison.net/2026/Oct/12/python-3-15/#a-sampling-profiler) through its paces by having GPT-6 Astra Extra High in Codex run it against my new [web-edit app](https://simonwillison.net/2026/Oct/12/web-edit/):\n\n> `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`\n\nHere's the resulting example [flame graph](https://simonw.github.io/research/python-3-15-web-edit-profiling/artifacts/flamegraph.html) and [heatmap](https://simonw.github.io/research/python-3-15-web-edit-profiling/artifacts/heatmap/index.html).\n",
  "authors": [],
  "captured_at": "2026-10-13T23:05:17.612288367+00:00",
  "category": "programming",
  "content_html": "<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/simonw/research/tree/main/python-3-15-web-edit-profiling#readme\">Profiling web-edit with Python 3.15: flame graphs and source heatmaps</a> — Profiling the unmodified web-edit app with Python 3.15’s built-in `profiling.sampling` revealed that mixed line-ending preservation dominated a busy editing workload: `preserve_endings` appeared in 64.8% of 15,296 recorded CPU stacks, with `SequenceMatcher.find_longest_match` contributing 38.3% of leaf samples. Sampling all threads was essential, since 95.1% of stacks came from AnyIO’s worker thread and would have been missed by a main-thread-only profile.</p>\n<p>I put the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://simonwillison.net/2026/Oct/12/python-3-15/#a-sampling-profiler\">new Python 3.15 profiler</a> through its paces by having GPT-6 Astra Extra High in Codex run it against my new <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://simonwillison.net/2026/Oct/12/web-edit/\">web-edit app</a>:</p>\n<blockquote>\n<p><code>I need a Python 3.15 flame graph and heatmap demo of the &quot;web-edit&quot; app from PyPI - research first then make me those demos</code></p>\n</blockquote>\n<p>Here's the resulting example <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://simonw.github.io/research/python-3-15-web-edit-profiling/artifacts/flamegraph.html\">flame graph</a> and <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://simonw.github.io/research/python-3-15-web-edit-profiling/artifacts/heatmap/index.html\">heatmap</a>.</p>\n",
  "content_markdown": "[Profiling web-edit with Python 3.15: flame graphs and source heatmaps](https://github.com/simonw/research/tree/main/python-3-15-web-edit-profiling#readme) — Profiling the unmodified web-edit app with Python 3.15’s built-in \\`profiling.sampling\\` revealed that mixed line-ending preservation dominated a busy editing workload: \\`preserve\\_endings\\` appeared in 64.8% of 15,296 recorded CPU stacks, with \\`SequenceMatcher.find\\_longest\\_match\\` contributing 38.3% of leaf samples. Sampling all threads was essential, since 95.1% of stacks came from AnyIO’s worker thread and would have been missed by a main-thread-only profile.\n\nI put the [new Python 3.15 profiler](https://simonwillison.net/2026/Oct/12/python-3-15/#a-sampling-profiler) through its paces by having GPT-6 Astra Extra High in Codex run it against my new [web-edit app](https://simonwillison.net/2026/Oct/12/web-edit/):\n\n> `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`\n\nHere's the resulting example [flame graph](https://simonw.github.io/research/python-3-15-web-edit-profiling/artifacts/flamegraph.html) and [heatmap](https://simonw.github.io/research/python-3-15-web-edit-profiling/artifacts/heatmap/index.html).\n",
  "dateCreated": "2026-10-13T23:05:17.612288367+00:00",
  "date_created": "2026-10-12T16:58:00+00:00",
  "date_modified": "2026-10-12T16:58:00+00:00",
  "date_published": "2026-10-12T16:58:00+00:00",
  "description": "Research: Profiling web-edit with Python 3.15: flame graphs and source heatmaps 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 web-edit app: I need a Python 3.15 flame…",
  "external_url": "https://simonwillison.net/2026/Oct/12/python-3-15-web-edit-profiling/",
  "git": {
    "commit": "ebb0941c5c06a2ab2377342d607535262a3e969e",
    "path": "items/simonwillison-net/2026/10/2026-10-12-profiling-web-edit-with-python-3-15-flame-graphs-and-source.md",
    "permalink": "https://github.com/aymericbeaumet/aggr-instance/blob/ebb0941c5c06a2ab2377342d607535262a3e969e/items/simonwillison-net/2026/10/2026-10-12-profiling-web-edit-with-python-3-15-flame-graphs-and-source.md"
  },
  "id": "urn:aggr:item:6dd338a630d12d1ef1457d0c90ccc186867e165b",
  "isBasedOn": {
    "@id": "https://simonwillison.net/2026/Oct/12/python-3-15-web-edit-profiling/"
  },
  "mainEntity": {
    "@id": "https://simonwillison.net/2026/Oct/12/python-3-15-web-edit-profiling/",
    "@type": "CreativeWork",
    "archivedAt": {
      "@id": "https://aggr.aymericbeaumet.com/items/simonwillison-net/2026-10-12-profiling-web-edit-with-python-3-15-flame-graphs-and-source/#webpage"
    },
    "dateModified": "2026-10-12T16:58:00+00:00",
    "datePublished": "2026-10-12T16:58:00+00:00",
    "headline": "Profiling web-edit with Python 3.15: flame graphs and source heatmaps",
    "timeRequired": "PT1M",
    "url": "https://simonwillison.net/2026/Oct/12/python-3-15-web-edit-profiling/",
    "wordCount": 135
  },
  "name": "Archived snapshot: Profiling web-edit with Python 3.15: flame graphs and source heatmaps",
  "preview": null,
  "reading_minutes": 1,
  "replicated_at": null,
  "source": "simonwillison-net",
  "source_name": "Simon Willison's Weblog",
  "summary": "Research: Profiling web-edit with Python 3.15: flame graphs and source heatmaps 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 web-edit app: 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's the resulting example flame graph and heatmap. Tags: profiling, python, codex",
  "tags": [
    "codex",
    "profiling",
    "python"
  ],
  "temporalCoverage": "2026-10-13T23:05:17.612288367+00:00",
  "title": "Profiling web-edit with Python 3.15: flame graphs and source heatmaps",
  "url": "https://aggr.aymericbeaumet.com/items/simonwillison-net/2026-10-12-profiling-web-edit-with-python-3-15-flame-graphs-and-source/",
  "word_count": 135
}