[GRADLE-2688] Gradle reports that "dynamic revision cache is expired" for static revision Created: 21/Feb/13  Updated: 11/Mar/13  Resolved: 03/Mar/13

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 1.5-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 0


 Description   

We have a multi-project build for which all the dependencies are concrete versions. When debugging the build, it constantly logs "Resolved revision in dynamic revision cache is expired" for each of the dependencies. It goes through all of the dependencies for each of the sub projects and re-resolves them. Having profiled it, this part of the build takes over 30s - which seems pretty long. Each of the subprojects has a different subset of a set of dependencies; what is the best way of sharing them among the subprojects? In which ways can we speed up this part of the build?

We are using 1.4 on windows with the daemon fetching dependencies from a few in house maven repositories.

Many thanks,



 Comments   
Comment by Gradle Forums [ 21/Feb/13 ]

Thanks for the report: you've actually pointed out a minor bug in our dependency resolution logic. An earlier refactoring ([1]https://github.com/gradle/gradle/comm...) failed to update the `DefaultCachedModuleVersion.isDynamicVersion()` method.

This bug results in the extra logging that you're seeing, but would likely have no significant impact on performance. At the caching level, Gradle does not look at the version to determine first if it's dynamic; Gradle will always look in the Dynamic Version Cache to see if there's a previous resolve. This is by design: think of this step as resolving a "version selector" to a single "version"; we plan to use this in the future for all sorts of goodness.

So the only impact of this bug is the extra debug logging and a few extra objects created (logic is in [2]https://github.com/gradle/gradle/blob...).

The likely cause of your slow resolution is actually cache locking - this is a hotspot (particularly on Windows) which we are currently working on addressing. So thanks for the report, and we feel your performance pain!
----------------------------------------------------------------------------------------
[1] https://github.com/gradle/gradle/commit/69d85a2#L3L26
[2] https://github.com/gradle/gradle/blob/master/subprojects/core-impl/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/CachingModuleVersionRepository.java#L108

Generated at Wed Jun 30 12:28:47 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.