-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Caching git heights #801
base: main
Are you sure you want to change the base?
Caching git heights #801
Commits on Aug 27, 2020
-
Adds caching of git heights. As calculating the height of repositories with large volumes of commits is expensive, caching the git heights can save time in the following circumstances: - Repetitive invocations of the `GetBuildVersion` msbuild task- e.g. during `dotnet pack`'ing a project, the `GetBuildVersion` task is invoked four times - Incremental versioning- in cases where a cached height is available for older commits, this value will be used avoid the cost of recalculating the entire git height (only new commits will need to be traversed) The caching behavior is enabled by default but can be opted-out by setting the new `NerdbankGitVersioningUseHeightCache` msbuild property to `false` ## Testing ### Automated testing - Verified `GitHeightCache` can serialize + deserialize heights correctly - Verified caching has a measurable impact on performance for cases when there are many commits to traverse - All existing tests pass ### Manual testing Consumed locally-packed version of `Nerdbank.GitVersioning` in a C# project and added ~1500 commits, verifying: - Height caching takes effect on second build, dramatically decreasing build time (~10s -> ~1s) - Adding an additional single commit can leverage the cached version for the previous ~1500 commits but adds the latest - Setting the `NerdbankGitVersioningUseHeightCache` property to `false` bypasses the caching behavior.
James Luck committedAug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for 86213c2 - Browse repository at this point
Copy the full SHA 86213c2View commit details -
Fixing required documentation errors
James Luck committedAug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for e82e23a - Browse repository at this point
Copy the full SHA e82e23aView commit details -
James Luck committed
Aug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for 9251308 - Browse repository at this point
Copy the full SHA 9251308View commit details -
Removing test SDK to see if this is cause for broken build
James Luck committedAug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for fad06f0 - Browse repository at this point
Copy the full SHA fad06f0View commit details -
Simplifying logic around discarding cache height when base version do…
…esn't match
James Luck committedAug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for 3fe9ec6 - Browse repository at this point
Copy the full SHA 3fe9ec6View commit details -
James Luck committed
Aug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for 234625e - Browse repository at this point
Copy the full SHA 234625eView commit details -
Testing adding a reference to compiler.unsafe to see if it will help …
…the build along
James Luck committedAug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for 85eef33 - Browse repository at this point
Copy the full SHA 85eef33View commit details -
More messing around with package versions- this time System.Numerics
James Luck committedAug 27, 2020 Configuration menu - View commit details
-
Copy full SHA for 7202d1b - Browse repository at this point
Copy the full SHA 7202d1bView commit details
Commits on Aug 28, 2020
-
Fixing a bug that meant the incorrect height would be returned for co…
…mmits with multiple parents (any cached height would be used and could prevent the relevant commit graph being walked)
James Luck committedAug 28, 2020 Configuration menu - View commit details
-
Copy full SHA for 670f6e7 - Browse repository at this point
Copy the full SHA 670f6e7View commit details
Commits on Sep 2, 2020
-
Adding support for the single version file scenario- git heights are …
…now cached on disk next to the `version.json`/ `version.txt` file in order that performance improvements can be seen by multiple projects.
James Luck committedSep 2, 2020 Configuration menu - View commit details
-
Copy full SHA for 2b58c63 - Browse repository at this point
Copy the full SHA 2b58c63View commit details