Hi all, Regarding GRADLE-514 - Test compilation and execution is slow.
I've taken a quick look at this and it looks like the executeIsolatedAntScript is taking up the time. This sets up a new URLClassLoader for every time it needs to execute a Groovy compile which causes a lot of overhead each groovy compile: Quick comparison: Java Project ( 1 class in main and 1 in test source): :init :processResources :processResources took 5 ms :compile :compile took 140 ms :processTestResources :processTestResources took 2 ms :compileTests :compileTests took 162 ms :test :test took 1716 ms BUILD SUCCESSFUL Total time: 4.29 secs Groovy Project ( 1 class in main and 1 in test source): :init :processResources :processResources took 6 ms :compile :compile took 2247 ms :processTestResources :processTestResources took 2 ms :compileTests :compileTests took 1701 ms :test :test took 2200 ms BUILD SUCCESSFUL Total time: 8.674 secs The time taken by a groovy compile is just way longer then the java compile. I think in order to speed things up we need to take a good look at our classloader handling because the 'non-logging' jars are loaded again while setting up the task classloader we need to reuse the classloaders setup in the bootstrap main I think ( and make sure the jars only get loaded once. This will not be possible with regular classloaders, we'll need to add some ClassLoader wrappers (to play with the order in the classloaders are used) in order to get this correctly setup but I think this will be the only way to speed up the groovy compile. I need to have a more detailed look at the classloader stuff but I don't have time now, I'll try and look at this some more tomorow, but I wanted to let you know what I already found. Kr, Tom
