Gradle import extremely slow
We recently moved to a hosted Nexus repo for our Maven Central mirror and artifact repository. It requires authentication. We implemented this by placing environment variables in our .bash_profile's and they read in without issue when refreshing the projects on the CLI. This is also promoted in our Concourse CI environment; credentials are supplied by CredHub.
Now when we import a gradle project into Intellij, or refresh it, it takes considerably long time to complete. In a project that had 13 subprojects, it was routinely taking 14:48 to complete. Larger projects were taking between 16 and 27 minutes to complete. I even had one that took just over 8 hours.
I've upgraded the gradle wrapper version to 5.2.1, which was supposed to fix some latency issues. I've also tried adding the local machine name to my /etc/hosts file, but to no avail.
This has significantly hindered our progress. We are looking for any further troubleshooting techniques and/or fixes for this. We can revert back to a good known working version of gradle if need be.
Thank you for your help.
Dan
Please sign in to leave a comment.
The same project builds from the terminal in less than 2 mins and sometimes even in less than a min.
Terminal / Command line env details
--------------------------------------------
Mac version 10.14.3 (18D109)
Java version : java version "1.8.0_201"
Gradle 4.10.3
IntelliJ Details
-----------------------
IU-183.5912.10,
JRE 1.8.0_152-release-1343-b28x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.3, screens 2560x1440
=====PERFORMANCE SUMMARY=====
Filesystem Info:
File system is case sensitive: false
Are there symlinks: false
Number of files: 7013
System Info:
Number of CPU: 12
Used memory: 419Mb
Free memory: 375Mb
Total memory: 795Mb
Maximum available memory: 989Mb
Displays:
Display 0: 2560x1440; scale: 1.00
Project Info:
Number of opened files: 10
File size (in lines): 157
File size in characters: 5794
Last action: _Undo
Number of injections: 0
Build version: IntelliJ IDEA 2018.3.5 Build #IU-183.5912.10 February 18, 2019
Java version: 1.8.0_152-release-1343-b28x86_64
Operating System: Mac OS X (10.14.3, x86_64)
JVM version: OpenJDK 64-Bit Server VM JetBrains s.r.o
Hello,
Could you please report an issue on YouTrack attaching logs folder zipped (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) after reproducing the issue: http://youtrack.jetbrains.com/issues/IDEA ?
Just a follow-up... We've enabled the Gradle Offline mode. We are utilizing the CLI to make sure all our builds and caches are up to date. Once that completes, we can do a clean import (while still in offline mode) and it completes in just a few seconds.
Setting Gradle to be online is when we see the issue occur again. A project with just 1 module could take upwards of 5 minutes to import. More modules mean longer time to import. This is not ideal and workaround for now.
Unfortunately, we can not send any logs or project resources to the YouTrack.
What IDE version do you use? We have similar issue opened on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-177730
I am currently on 2018.3.5 CE, but we've also seen it on Ultimate Edition as well.
Is it possible to try 2019.1 EAP with default settings?
In 6.8.1 I can see that Intellij 2020.3 1 is reaching out to resources.jetbrains.com and jetbrains.bintray.com
This is despite me including an internal distro of gradle in my distribution Url.
So behind a corp proxy doing a project load in Intellij is terminally slow.
We are downgrading to 5.8.x as this does not exhibit this error.
I cannot hack my hosts file BTW so that's not a fix.
Any fix from the Vendor?
John Lonergan
I see you already submitted a corresponding ticket to YouTrack: https://youtrack.jetbrains.com/issue/IDEA-273346
Please find a reply there.