Reputation: 1377
I'm using IntelliJ IDEA to develop my Java application. I'm frustrated with the fact that the first compilation of a project (or a complete rebuild) takes very long, about 15 min (and is very CPU-intensive). The project is composed from a couple of hundreds of Java classes, but compiling it with Eclipse just need 1-2 minutes.
Are there any compilation options that I can set in order to speed up this step?
UPDATE
My configuration: SSD, 64GB RAM, Xeon E5-1660, Win 7 Ultimate
Compilation time (Rebuild):
Eclipse: 30s
IntelliJ IDEA with Eclipse compiler 45s
IntelliJ IDEA with javac compiler: more than 10 minutes (!)
Number of java classes ~5000
Upvotes: 15
Views: 12202
Reputation: 1377
Answer from IntelliJ Support:
Disable the option to clean output directories on rebuild in the compiler settings.
Upvotes: 4
Reputation: 2973
Change the following setting (Build process heap size) to some large value
Upvotes: 9
Reputation:
You can also increase the heap size in the file Intellij IDEA\bin\idea.exe.vmoptions
. For example try these (assuming you have a lot of RAM):
-Xmx6g
-Xms6g
-XX:MaxPermSize=512m
-ea
-server
-XX:+UseConcMarkSweepGC
Having done this, you need to start idea
with idea64.exe
because the default 32bit
version will not be able to use the big ram.
Upvotes: 2
Reputation: 27113
You can use the Eclipse compiler from IntelliJ IDEA.
Enable the Eclipse compiler from Settings -> Compiler -> Java Compiler: "Use compiler:" (change from Javac to Eclipse).
update: Here's my compilation times for a full rebuild, using IntelliJ IDEA 13 on a fairly large project:
Using javac 1.7.0_45 to compile java sources
Compilation completed successfully with 60 warnings in 27 sec
Using eclipse compiler to compile java sources
Compilation completed successfully with 652 warnings in 26 sec
So there seems to be something strange with your setup.
Upvotes: 4
Reputation: 244
Upvotes: 1