Troubleshooting extremely long refreshes of Gradle projects

We have been migrating to use Gradle for all our builds.

We have three library projects that are loaded separately.  Two of them have a relatively small number of projects, and load very quickly.

The third one is pretty large, with near to 70 subprojects (all of which are generally pretty small).

This large project has grown to the point where doing a refresh from IntelliJ IDEA (14.1.4) is extremely painful.

It used to take an annoying, but relatively short time when a change was made to the root project.  It could take 30-45 seconds.

It has grown however, to take upwards of 20 minutes to do a refresh when I manually hit the refresh button, or a change to the root project occurs.

Are there any ways I should go about troubleshooting this?  It just seems to slow down, and takes longer and longer under tasks "Gradle: Resolve dependencies ':xyz'".  

I can run a full command line build with the gradle wrapper (v2.5), very quickly, so it is not that we have gone beyond some limit with Gradle itself.

Gradle Wrapper:

 
distributionBase=GRADLE_USER_HOME
distributionPath
=wrapper/dists
zipStoreBase
=GRADLE_USER_HOME
zipStorePath
=wrapper/dists
distributionUrl
=https\://services.gradle.org/distributions/gradle-2.5-bin.zip


Looking at the task manager (on Windows), IntelliJ idea isn't using any significant CPU time, but is using over a gig of RAM.  This amount is not especially concerning, unless it is bumping up to some limit that is causing things to go slow.  Our development machines have more than enough RAM to run the task (my machine in this particular instance has 96 gig of RAM, so there is plenty to allocate if necessary).

Regards,
Mark E. Scott, Jr.

4 comments
Comment actions Permalink

We did figure this out.  It was a plugin that was loading for dependency management.  It was adding time to the command line build, but not nearly so much as when loading projects in the IDE.

0
Comment actions Permalink

I Mark, please could you tell me which plugin because I am having the same problem :( thanks

0
Comment actions Permalink

Similar issue here. Refresh takes extremely long and eventually not all dependencies are there. Dependencies are proxied by an Artifactory server which is working just fine. The problem occurs for just one project, the refresh for other projects is zippy.

0

Please sign in to leave a comment.