2009/6/3 Hans Dockter <[email protected]>

>
> On Jun 3, 2009, at 4:23 PM, Hans Dockter wrote:
>
>
>> On May 31, 2009, at 9:21 PM, Peter Niederwieser wrote:
>>
>>
>>> Hi,
>>>
>>> first of all my congratulations to Gradle 0.6! I'm happy to say that
>>> compiling and running Spock specifications now works just fine. Also I'm
>>> impressed with the much improved build script DSL.
>>>
>>> I have a HelloSpock project that contains a single Groovy class (a Spock
>>> specification). What puzzles me a bit is that 'gradle test' takes 10
>>> seconds
>>> to complete. By comparison, 'ant test' takes 3 seconds, and 'mvn test' 8
>>> seconds.
>>>
>>
>> What version of Maven are you using?
>>
>>  This is on repeated invocation, i.e. all downloading and
>>> compilation has already taken place. Do you consider this acceptable?
>>> Would
>>> the difference be less pronounced for bigger projects?
>>>
>>
>> First of all I'm surprised by the seven seconds difference. It would be
>> interesting to see which areas are mostly responsible for this (startup
>> time, dependency management, testing, ...). We will have a look at this. I
>> assume it is less pronounced in larger projects. But we have to examine this
>> to be sure.
>>
>
> After all it does not look that bad. It is not a fundamental issue. Here
> are some numbers:
>
> Gradle
> time gradle clean compile
> real    0m3.188s
> user    0m2.909s
> sys     0m0.177s
>
> Ant 1.7
> time ant clean compile
> real    0m2.204s
> user    0m1.841s
> sys     0m0.239s
>
> Maven 2.0.9
> time mvn clean compile
> real    0m2.648s
> user    0m2.351s
> sys     0m0.189s
>
> So you see that there is a small Groovy startup time cost but I think this
> is no problem.
>
> The tests are taking so much longer for two reasons. One is that the
> compileTests always checks for the newest Spock snapshot in the remote
> repository. Which is different to the Maven behavior which checks by default
> once a day. Not using a snapshot this yields:
>
> time gradle clean test
> real    0m7.668s
> user    0m6.839s
> sys     0m0.564s
>
> time ant clean test
> real    0m3.405s
> user    0m2.893s
> sys     0m0.364s
>
> time mvn clean test
> real    0m7.752s
> user    0m7.044s
> sys     0m0.487s
>
> Which means Gradle is as fast as Maven but significantly slower than Ant.
> Tom has added a lot of auto test detection stuff in 0.6 I'm wondering if
> this is related to that.


It would surprise me if the test class detection would be the cause of
this.

For Gradle itself it only takes
- <5 secs to create the package <-> jars index
- and less than a second to detect all the tests (2000+ tests) .


> Even just compiling the tests take surprisingly long.


Test class detection is done in the test task itself so this is done after
test class compilation. Not sure what could be causing this I'll need to
have a closer look.

>
>
> I have filed a Jira: http://jira.codehaus.org/browse/GRADLE-514
>
>
> - Hans
>
> --
> Hans Dockter
> Gradle Project Manager
> http://www.gradle.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to