跳到正文
Simon Willison·· 1 天前AI 评分22

用 Python 3.15 剖析 web-edit:火焰图与源码热力图

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

AI 导读

用 Python 3.15 内置的 `profiling.sampling` 剖析未修改的 web-edit 应用发现,混合换行符保留是编辑负载的主要瓶颈:`preserve_endings` 出现在 64.8% 的 15,296 个 CPU 栈中,`SequenceMatcher.find_longest_match` 占叶子样本的 38.3%。

来源:Simon Willison · simonwillison.net