Skip to content

Serious perf regression between 0.22.0 and 0.23.0 #1368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AArnott opened this issue Sep 19, 2016 · 5 comments
Closed

Serious perf regression between 0.22.0 and 0.23.0 #1368

AArnott opened this issue Sep 19, 2016 · 5 comments

Comments

@AArnott
Copy link
Contributor

AArnott commented Sep 19, 2016

I recently upgraded Nerdbank.GitVersioning from libgit2sharp 0.22.0 to 0.23.0-pre20160803182831 because it fixed #1338. But after running my tests, I found there was a huge perf regression in the newer version.

Before, with 0.22.0:
image

After, with 0.23.0-pre20160803182831:
image

Repro instructions:

git clone https://github.com/AArnott/Nerdbank.GitVersioning.git
cd Nerdbank.GitVersioning
git checkout 4613c2516787
.\init.ps1
src\Nerdbank.GitVersioning.sln

In VS, build the solution.
In Test Explorer set "_roundtrip" to be your test filter and run tests.

AArnott added a commit to dotnet/Nerdbank.GitVersioning that referenced this issue Sep 19, 2016
A huge perf problem surfaces with 0.23.0-pre20160803182831
See libgit2/libgit2sharp#1368
@AArnott
Copy link
Contributor Author

AArnott commented Sep 19, 2016

I ran an ETL trace on the regression. It seems very clearly due to an added new StackTrace(int, bool) call made from the Libgit2Object constructor:

Name                                                                        Inc %         Inc
 libgit2sharp!LibGit2Sharp.Core.Handles.Libgit2Object..ctor(void*,bool)      60.8      18,112
+ mscorlib.ni!System.Diagnostics.StackTrace..ctor(Int32, Boolean)$##6003121  58.9      17,563

@AArnott
Copy link
Contributor Author

AArnott commented Sep 19, 2016

It looks like LEAKS_TRACKING was defined for the build that released to nuget. :(

@ethomson
Copy link
Member

Ouch. Thanks for digging in. I can merge #1357 and spin a new prerelease build.

@biyimaks
Copy link

@ethomson when will a new build be created?

@ethomson
Copy link
Member

Please see https://www.nuget.org/packages/LibGit2Sharp/0.23.0-pre20160922233542

Thanks again @AArnott for reporting this, and thanks @biyimaks for the ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants