libgit2 / libgit2/libgit2sharp
Diff compare with DiffTargets.WorkingDirectory is terribly slow
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Reproduction steps
Compare commit to the working tree directory on a relatively big repository
repository.Diff.Compare<TreeChanges>(
repository.Head.Tip.Tree,
DiffTargets.WorkingDirectory)
which takes a long time or never completes. Comparing the working trees of two commits works instantly
var branchDiffResult = repository.Diff.Compare<TreeChanges>(
targetCommit.Tree,
repository.Head.Tip.Tree,
compareOptions);
Additionally, doing repository.RetrieveStatus() is also slow, but not that slow.
Expected behavior
The speed of the two matches.
Actual behavior
Comparing to working directory is terribly slow.
Version of LibGit2Sharp (release number or SHA1)
0.27.0.0
Operating system(s) tested; .NET runtime tested
4.72, windows 11
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện tình trạng chậm với repository.Diff.Compare(repository.Head.Tip.Tree, DiffTargets.WorkingDirectory) trên một repository tương đối lớn, sau đó so sánh với overload commit-to-commit và repository.RetrieveStatus(). Theo dõi đường dẫn so sánh thư mục làm việc và đo lường thời gian được sử dụng ở đâu. Công việc được xem là hoàn thành khi phép so sánh thư mục làm việc hoàn tất với hiệu năng tương đương phép so sánh commit-to-commit.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, git
- Lĩnh vực
- backend-api-design, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100