-
Notifications
You must be signed in to change notification settings - Fork 155
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
Retrieving the version for large repositories is slow #736
Comments
hi! sure, feel free to make a PR with those improvements. |
This flag is implemented similar to overriddenBranch and allows to set the "isClean" flag for the repository. Which basically determines if the working tree is dirty or clean. One use-case is to speed up the computation when running the plugin locally as the isClean-calculation is quite time consuming. Also it may help during development of the version-rules. This solves one part of issue allegro#736
This flag is implemented similar to overriddenBranch and allows to set the "isClean" flag for the repository. Which basically determines if the working tree is dirty or clean. One use-case is to speed up the computation when running the plugin locally as the isClean-calculation is quite time consuming. Also it may help during development of the version-rules. This solves one part of issue allegro#736
This flag is implemented similar to overriddenBranch and allows to set the "isClean" flag for the repository. Which basically determines if the working tree is dirty or clean. One use-case is to speed up the computation when running the plugin locally as the isClean-calculation is quite time consuming. Also it may help during development of the version-rules. This solves one part of issue #736
Just found there is also a related issue: #182 (just referencing it in case somebody stumbles over the other) For the performance-problem with getting the tags I figured out a different optimization: Together with the overridenIsClean flag I get the |
When following the recommended way to set the version in a gradle project:
it can take a considerable amount of time to compute it for larger projects.
How to reproduce (real project)
git clone https://github.com/spring-projects/spring-framework.git
(28k commits, 10k files) (note: this is actually not that big.)scmVersion.version
:git tag -d $(git tag)
or configure the plugin, that it works./gradlew cV
and watch out for the "Took Xs"Measurements:
for i in $(git ls-files|grep -v "/$"); do touch "$i.release-plugin-test"; done
for i in $(seq 1 30000); do git commit --allow-empty -m"$i"; done
How to reproduce (real project)
Alternatively, one can create an empty git project with only build.gradle:
for i in $(seq 1 30000); do git commit --allow-empty -m"$i"; done
for i in $(seq 1 100000); do touch "$i.tmp"; done
Measurements:
Why is it important?
The current version is calculated with each execution of gradle. This means, that it also runs for each test-execution from the ide.
Also my examples here don't paint the full picture: for a different project it takes 20s on my machine. Due to gradles build-directories and maybe some other random things, I have 600k files.
Proposed solutions
I think most of the time is spent in computing things, which are not always important:
The text was updated successfully, but these errors were encountered: