Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Painfully slow make with IDEA 12.0

I love the new incremental Java compile in IDEA 12.0 but there seems to be a price to pay. Making now takes about twice as long as in 11.x, most of the time appearing to be spent

Executing DEX

(according to the status bar).

I can take a 12.0 project, revert to 11.x and making is back to "normal speed" (approx 4 minutes vs 30 seconds).

I don't get this. AFAIK, IDEA (or Eclipse or any other IDE) is just shelling out to dx.jar to compile the Dalvik executable. If there was a problem with the ADT, it would affect 11.x equally.

OS is Win 7 Ultimate. 3.2GHz quad core with 16GB but I suspect that the issue is not related to OS or PC since 11.x is OK.

Any ideas? I'll log a bug with Jetbrains but wanted to see if anyone has more concrete info or workarounds? There's nothing so far on the Jetbrains bug tracker or fora that I can find.

like image 775
Simon Avatar asked Jan 09 '13 18:01

Simon


1 Answers

I have had this issue a couple of times in the past and it's always been due to the inclusion of a global library that hangs during build.

On one occasion it was due to the Python libraries trying to execute when the Android project was built because I had a python file in my Android project and IntelliJ decided to add the Python runtime libs to my project dependencies.

More recently the same thing happened with Groovy when I had a gradle file in the Android project.

For me I simply removed these dependencies from the project and the problem resolved itself.

In my case I discovered this by force killing (kill -9) the java process that was running the make. This caused intellij to dump the error to the Messages view in the IDE where I could see groovy trying to execute.

like image 73
Jason Polites Avatar answered Oct 04 '22 02:10

Jason Polites