研究 使用 Python 3.15 对 web-edit 进行性能分析:火焰图与源码热力图——使用 Python 3.15 内置的 `profiling.sampling` 对未经修改的 web-edit 应用进行性能分析后发现,在繁忙的编辑工作负载中,混合换行符的保留占据主导:`preserve_endings` 出现在记录到的 15,296 个 CPU 调用栈中的 64.8% 里,其中 `SequenceMatcher.find_longest_match` 贡献了 38.3% 的叶子节点采样。对所有线程进行采样至关重要,因为 95.1% 的调用栈来自 AnyIO 的工作线程,只分析主线程的话会全部漏掉。
我让 Codex 中的 GPT-6 Astra Extra High 针对我的新web-edit 应用运行新的 Python 3.15 性能分析器,借此全面检验了它:
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