Finding modules is a bottleneck for parallel checking on Windows

未关闭
#21,336 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
冷清
技术栈
python

调研方向

复现 issue 中描述的 Windows 自检性能分析,重点关注初始加载图期间的协调器进程。跟踪模块查找路径,并将其耗时与 Mac/Linux 进行比较;当经过测量的优化在不改变检查行为的情况下减少 Windows 瓶颈时,这项工作就完成了。

由索引模型根据 Issue 内容生成。

描述

parallel checking performance

While doing some basic profiling on Windows, it looks like finding modules is a major bottleneck, taking most of the initial graph loading (part that cannot be parallelized currently). Here are example build stats from coordinator process (unimportant things skipped) on self-check:

find_module_time:       0.591
graph_load_time:        0.877
scc_wait_time:          3.639  # this is actual processing time

For comparison, finding modules on self-check takes 50-100ms on Mac/Linux. Not sure what exactly is going on here, but this may be something we want to try optimizing.

cc @JukkaL @emmatyping

主要语言
Python
星标
20.6k
派生
3.3k
平均合并
1 天 18 小时
30 天内合并 PR
54

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

python/mypy 的其他 Issue

查看 python/mypy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。