libgit2 / libgit2/libgit2sharp
ObjectId are materialized too early in git_odb_foreach
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
When enumerating objects in an ObjectDatabase, all ObjectId_s are materialized before enumeration. In a reasonable active repostory this results in a large working set and delay of processing.
-
Proxy should provide an equivalent of git_odb_foreach that is lazy/on-demant and does not materialize all ObjectId_s. (https://github.com/libgit2/libgit2sharp/blob/7f59d22c4fdb7b3d14511aca567e64eefaa43ab2/LibGit2Sharp/Core/Proxy.cs#L1557)
-
ObjectDatabase should use the lazy enumerator from Proxy instead of the ICollection (https://github.com/libgit2/libgit2sharp/blob/7f59d22c4fdb7b3d14511aca567e64eefaa43ab2/LibGit2Sharp/ObjectDatabase.cs#L44)
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
閱讀 LibGit2Sharp/Core/Proxy.cs 第 1557 行附近的內容,以及 ObjectDatabase.cs 第 44 行附近的內容。追蹤目前如何公開 ObjectId_s,並確定如何讓 Proxy 列舉保持 lazy;完成標準是 ObjectDatabase 在不先 materialize 每個 ObjectId_s 的情況下進行列舉。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git
- 領域
- devtools, performance
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100