-
Notifications
You must be signed in to change notification settings - Fork 651
Performance improvements - profiling and simple caching #1838
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
Performance improvements - profiling and simple caching #1838
Conversation
Used the profiler to find hotspots, most were in Regex matching of commit messages. Added simple static cache to IncrementStrategyFinder. Runtime halved on medium-sized git codebase (~3 years of history).
@erikbra, thank you so much for your time and effort looking into this! Highly appreciated! The AZDO build is failing, though – would you care to look into why? |
…ndex (build failed on Linux)
Really strange. The build fails only on Linux, and the error is not anywhere near where I've touched:
I did try to fix it, even though it's unrelated. Don't have a linux box available right here, and it built on my Mac even before the change. Buut let's see if I nailed it anyway ;) |
Looks like the build error was introduced in master a couple of commits before my PR. But, nevermind, I fixed it in the PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! Thank you so much! 🙏
Nice build pipeline in Azure DevOps btw... where does the "Release" task put stuff? Is it possible for me to use a pre-release of the GitVersion task in our own DevOps builds? Or is that a manual process? I'm thinking of using something like this in my .yml?
|
You have to install https://marketplace.visualstudio.com/items?itemName=gittools.gitversion-preview into your organization in order to use it. This is the preview version we publish on non release version, basically on every not tagged commit |
Thanks, @arturcic . Worked like a charm. And run time on all our builds' GitVersion step is now down from 60-70s to ~20s. Happy, happy!! |
Used the profiler to find hotspots, most were in Regex matching of
commit messages. Added simple static cache to
IncrementStrategyFinder
.Runtime halved on medium-sized git codebase (~3 years of history). Same on GitVersion's own codebase.
There are several issues raised concerning performance issues, e.g. #1208, #1066, and more. I am also experiencing issues with a large-ish codebase, so I started looking into it. This one is a low-hanging fruit. Hopefully more to come (e.g. I also suspect that #360 has introduced rather heavy performance issues, but I'll look further into this in a separate PR)
Medium-sized codebase:
before:
after:
GitVersion codebase:
before:
after: