libgit2 / libgit2/libgit2sharp
Leak when iterating through commits and diff them
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
When I run the code below on a production repository, i can see that the memory is all the time increasing and after about 3000 commits my pc crashes with out of memory.
For about 1000 commit it reserved about 500 MB Ram.
Code for Testsetup see here:
https://gist.github.com/Gentlehag/9f595ab13f459e22859fa5d9557e550b
PS: I also posted here:
http://stackoverflow.com/questions/39258639/possible-leak-when-reading-content
My target is to just iterate through all commits and getting all files that were changed in eahc commit.
Is there a better way ? Is this a bug?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先运行 issue 的 GitHub Gist 中链接的复现,并在遍历提交和 diff 的过程中观察内存。将行为与 Stack Overflow 讨论进行比较,然后确定泄漏是在提交迭代中还是在 diff 处理过程中;完成的标准是复现增长现象,并确定经过验证的修复方案或有文档记录的替代方案。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, git
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100