Stashes.Add taking forever to complete

Open
#1,715 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, git
Domain
performance

Research direction

Start by reproducing the reported stash-add timing with the 0.26.x and 0.25.4 LibGit2Sharp packages on the described large repository, then compare the behavior with Git. Identify the 0.26.x regression and verify that stash add completes in approximately the earlier or Git-like timeframe.

Written by the indexing model from the issue text.

Description

I have a local Git repository that is 1.5 Gigs in size.... 34 579 source files in it. It takes overs 2 minutes (135 551 ms) to complete a "stash add", for only 1 modified file in the repo.... which is not acceptable.

Git-scm does it in approximately 2 seconds.

Reproduction steps
Expected behavior
Actual behavior
Version of LibGit2Sharp (release number or SHA1)

I was using the Libgit2Sharp NuGet package version 0.26.1... I have tried 0.26.0.... same results. Then, I have tried with 0.25.4... it worked in less than 2 seconds. Something broke in version 0.26.x

Operating system(s) tested; .NET runtime tested

It is in a Visual Studio Profesionnal 2017 C# project, under Windows 10 64 bits. Framework 4.6.1.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libgit2/libgit2sharp

All issues in libgit2/libgit2sharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.