Massive libgit2 performance regression observed in Kubuntu 25.04 and Windows 11
Summary
In the version of libgit2 bundled with kubuntu 25.04 (1.9.0+ds-1ubuntu1) there is an enormous performance regression compared with the version bundled with 24.10. I built the library myself to narrow the issue down. I conducted a binary search of git commits and narrowed it down to fb1797de6307d8f705f9079e759860234a10de07, which is the first commit that shows the problem: the parent 93c94446cd69bec6d4a2e61e9384ebfa159d1e19 is fine. (These are between the v1.8.0 and v1.8.1 tags.)
Reproduction
Using kubuntu 25.04 (I have tested with a clean installation):
- Clone the libgit2 repository
- Check out revision 93c94446cd69bec6d4a2e61e9384ebfa159d1e19 and build
- Run ctest -V. Time is normal: my output is here ctest-93c94.txt and the overall time is 194.92 s.
- Check out revision fb1797de6307d8f705f9079e759860234a10de07 and build
- Run ctest -V. Time is extremely slow: my output is here ctest-fb1797.txt and the overall time is 996.67 s.
The biggest slowdowns occur in the online::badssl test (test 3 goes from 34.08 s to 434.25 s most of which time was stuck on the badssl test) and test 10 auth_clone which goes from 2.58 s to 402.93 s.
This is absolutely crippling performance in applications that use libgit2, for example Siril uses it to clone or fetch a repository at startup and it has gone from being unnoticeable (< 1 s) to taking approx. 6 minutes.
I'll be happy to provide any further help in terms of testing things, just let me know.
Siril issue referencing this one is here, for reference.
Would you be able to try applying https://github.com/libgit2/libgit2/pull/7024 and see if that helps?
FTR, the corresponding Ubuntu bug is https://bugs.launchpad.net/ubuntu/+source/libgit2/+bug/2114179
@lrm29 yes, #7024 fixes the issue for me: the test suite runs similarly quickly (test 3 is 45 s instead of 35 s but all other tests are as expected) and Siril opens its repositories immediately again. Thank you.
I can repro this on Windows 11 and #7024 also solved it for me.