views:

314

answers:

3

When I "junit" some class, compilation in Idea takes about 4-5 sec. In Eclipse it takes milliseconds.

What should I do to speed up Intellij Idea compilation for tests?

A: 

I don't have IntelliJ in front of me but could it be that IntelliJ is set to do a clean compile before it runs the tests where Eclipse is set to do a make (I.e only compile changed classes)

Just a thought

Shawn
check for module settings, idea settings: nothing.
blackliteon
I just started IntelliJ and I see a checkbox in the Run/Debug configurations which is Make so my original idea was wrong and make will only compile the changed classes. Some other things to check:1) Are they using the same version of Java? This could make a difference.2) Have you edited the eclipse ini file giving it more memory therefore running one ide with more memory than the other3) Double check both run debug configurations for differences
Shawn
Debug / Run - no difference. Maybe eclipse compile classes in background, but effictevly than idea (may be idea file cache play role)
blackliteon
By default Eclipse does a Make when you save a file so this means that the classes are probably all compiled buy the time you start the tests but if you make sure both are compiled before running the tests is IntelliJ still slower?Can you check the version of Java both are using?
Shawn
They use same JRE
blackliteon
Just to check. If you compile the IntelliJ project and in the Run/Debug un-check the Make before running tests. If it is still slower then it is not the compile. They are both using the same unit test package?
Shawn
Other than that I reckon its a question for the IntelliJ team on http://www.jetbrains.net/devnet/community/idea/ideacommunity
Shawn
+1  A: 

Eclipse compiles on the fly (on save), so it does not have to do anything but to start the tests. Idea does not. Before starting the tests it has to make (compile all changed classes of the whole project). It is also not possible to start a test in idea when there is any compile error elsewhere in the project.

Arne Burmeister
Is it possible to enable this in idea ? I perss "test all" button hundred times.
blackliteon
Idea does not have this feature. You can bind Make to Ctrl-S, maybe that helps a little if you are a "Save often save early" guy ;-)
Arne Burmeister
+1  A: 

There is plugin in Idea plugin repository which solve exactly this problem!

blackliteon