Poor performance from resolves with large number of dependencies and exclude rules

(Danny Thomas) #1

Gradle Version: 2.14
Operating System: macOS
Is this a regression? Don’t believe so, but potentially worse in later releases

We have a project with a very large number of dependencies and excludes which exhibits poor dependency resolution performance due to the overhead of handling those excludes:

I can’t provide an example project unfortunately, but can at least give you an indication of the size of the data so you can get a feel on where the complexity gets out of hand:

  • The project profiled above takes ~3 minutes total to resolve dependencies with a warm cache. There are 12 total projects in the build, so this blows out to 25-30 minutes for a complete build
  • 889 selected dependencies, 1075 unselected dependencies (total of 1964 in conflict resolution)
  • 50 excludes

(Cédric Champeau) #2

Hi Danny!

We have refactored the exclusion management code in 3.0. Could you try with 3.0-milestone-2, or even better with latest master and tell us if you are still seeing the issue?



Hey Danny
This is really helpful.
I’m trying to reproduce something like your use case.

  • How are the exclusions defined? Maven POM, ivy.xml, or build.gradle?
  • What does a typical exclusion look like? For POM or build.gradle, you don’t have a lot of flexibility. But if the exclusions are defined in ivy.xml, then you can specify any combination of organization, module, type, matcher, etc.

Having this info would really help me reproduce.