remote fetch is extremely slow
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- git, python
- 領域
- performance
研究方向
先使用回報的儲存庫大小和分析器輸出重現更新緩慢的問題,重點檢查 kprocessor.py:1645 (_startCacheUpdate) 以及 pygit2 remote.py 的 fetch 進入點。比較 git_remote_fetch 和 clone_repository 所花費的時間,並找出哪個擷取後的操作造成延遲;完成的定義是已隔離變慢的環節,並記錄一項可執行的修正方案或診斷結果。
由索引模型根據 Issue 內容生成。
描述
I have a tool that pulls down and installs a decent sized repository. Cloning the repo is fast and works well, however fetching subsequent updates is extremely slow. trying to figure out where the slowdown was coming from I ran my code through a profiler and obtained this result:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.001 0.001 616.895 616.895 \bkprocessor.py:1645(_startCacheUpdate)
1 0.000 0.000 405.243 405.243 AppData\Roaming\Python\Python37\site-packages\pygit2\remote.py:120(fetch)
1 404.655 404.655 405.243 405.243 {built-in method pygit2.libgit2.git_remote_fetch}
1 0.000 0.000 210.191 210.191 AppData\Roaming\Python\Python37\site-packages\pygit2_init.py:165(clone_repository)
1 204.704 204.704 210.191 210.191 {built-in method pygit2._libgit2.git_clone}
as you can see it cloned the repo in 210 seconds, pulling down nearly 1300 MB. during the clone additional commits came in and the subsequent fetch pulled down 42 MB quickly but then seemed to sit taking a total of 405 seconds, nearly twice as long as the clone operation.
Now I'm not sure exactly what in the fetch is taking so long, but whatever it is happens after retrieval of the data from the remote.
any advice on what I can do?
- 主要語言
- Python
- 星號
- 1.7k
- 分支
- 409
- 平均合併
- 1 天 21 小時
- 30 天內合併 PR
- 4
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
libgit2/pygit2 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 1/5 1 小時以內 新手友好度 88/100
-
Feature Request: Support app-level temporary config overrides using libgit2's backend supprt可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
-
難度 3/5 1-2 天 新手友好度 48/100
-
難度 3/5 1-2 天 新手友好度 55/100
相似的 Issue
-
area: agents area: docs good first issue
難度 2/5 1-3 小時 新手友好度 88/100
openapi/gknowledge#23 ·
-
get() for StrEnum可能已有人在做 @FeJo5952 今天認領。 未關閉good first issue
難度 2/5 1-3 小時 新手友好度 72/100
collective/icalendar#1921 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement Python Spans
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-python#7994 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
alphagov/notifications-api#5004 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
equinor/radix-flux#3922 ·
維護者通常 1 天內回覆