groovy performance inside IJ

For some reason executing groovy code inside IJ is MUCH, MUCH slower than executing from the command line. Is this a known problem?

0
8 comments
Avatar
Permanently deleted user

Nope, and I actually don't believe it. Do you have any script that can be benchmarked?

0
Avatar
Permanently deleted user

I have actually seen what I think is something comparable.

If I make lots of changes to a controller in a grails app running under IJ's debugger, I find that I eventually need to restart the grails app because it becomes unusably slow. I haven't bothered characterizing this more carefully, but it wouldn't be too surprising to me if reloading the controller ate up enough memory to cause some problems.

0

Nope, and I actually don't believe it. Do you have any script that can be benchmarked?



here is my script:
package test.testcases.reporting

class DeploymentTest extends GroovyTestCase {
void setUp() {
}

void testBlah() {
println("blah")
}
}

}

I narrowed it down. If I create a new project then my groovy testcase execution is fast from IntelliJ. However from my big monster project here's what it does:

time 0 seconds: I click the Run Arrow
time 1 seconds: status bar says "compilation completed successfully", test pane at bottom says "instantiating tests..."
time 14 seconds: test pane says "testBlah(test.testcases.reporting.DeploymentTest)"
time 21 seconds: test pane says "All Tests Passed", output says "blah"

Note that my project contains 1000s of files and a huge classpath.

0

I did some more investigation. First, it's not a groovy problem. Java is slow too. It's not a test problem, public static void main code is slow. I bumped up max heap size to 768m, so it's not a memory problem.

I should note I'm on a mac and WAS running java 5.

I installed the new java 6 and set up IJ to run on Java 6. This mostly solved the problem. It's still not as fast as the command line, but it cut my execution time down from 20+ seconds to about 5 seconds.... which I can live with.

0
Avatar
Permanently deleted user

That seems to be an issue with IntelliJ JUnit runner, so you should probably post a JIRA request to http://www.jetbrains.net/jira/browse/idea

0
Avatar
Permanently deleted user

Oops, please ignore it - I've just misread your last comment.

0
Avatar
Permanently deleted user

Where did you get java 1.6?

Are you using the non-apple port? Or has apple released 1.6?

0
Avatar
Permanently deleted user

According to information posted on another thread (http://www.intellij.net/forums/thread.jspa?threadID=275130&tstart=0) Java 1.6 for MacOS is available only for those running on 64-bit hardware. So if you have a Core Duo Macintosh (I have two!), you're out of luck for Java 1.6. You can only get Java 1.6 if you have a Core 2 processor (or higher).

Randall Schulz

0

Please sign in to leave a comment.