libgit2 / libgit2/libgit2sharp

Commit and stage execution time not constant

未关闭
#683 14 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C#
星标
3.5k
派生
925
PR 合并指标
30 天内没有已合并 PR

描述

I am currently using LibGit2Sharp (v0.15.0) to keep track of differences in many HTML files (~10,000). Each change to a file or new file results in a single commit. I have noticed that writes and commits are getting slower and slower. Here is a visualization of my tests:
graph

I tried to adjust the repository.Stage(...) and repository.Commit(...) time so that the size of the HTML file size was not taken into account. This was done by simply dividing the write and commit time by the file size.

I was not sure whether this slow down was expected, but after a bit of reading around, it seems to me that git commit should be constant time with respect to the number of commits or files already in the repository. I am not sure if the same assumption can be made about staging.

Is this a known issue with LibGit2Sharp? Or libgit2?

贡献指南

打开贡献指南

从这里开始

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

调研方向

使用该 issue 中约 10,000 个 HTML 文件的工作负载,通过 LibGit2Sharp v0.15.0 重现所报告的性能下降,并在 repository 逐渐增大时测量 Stage 和 Commit。将结果与预期的 Git 行为进行比较,并确定原因属于 LibGit2Sharp 还是 libgit2;记录调查结果以及任何相关的 upstream issue。

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

评估

技术栈
csharp, git
领域
performance, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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