On May 28, 2008, at 1:06 PM, Ittay Dror wrote:
hdockter wrote:
time groovy HelloGroovy.groovy
(My machine: 1.1 seconds)
time java -cp .:path_to_groovy-all_jar HelloGroovy
(My machine: 0.35 seconds)
time java HelloJava
(My machine: 0.1 seconds)
(note: using 'groovy' means running /usr/bin/groovy which is an ubuntu
package of groovy 1.5.4)
/tmp/perf > time groovy HelloGroovy.groovy
hello
real 0m1.034s
user 0m1.184s
sys 0m0.084s
/tmp/perf > time java -cp
.:/work/research/gradle-0.1.4/lib/groovy-all-1.5.5.jar HelloGroovy
hello
real 0m0.788s
user 0m0.640s
sys 0m0.028s
/tmp/perf > time java HelloJava
Hello
real 0m0.150s
user 0m0.088s
sys 0m0.028s
So it looks like using the groovy jar in gradle is what is causing the
slowdown. When running the 'groovy' command (first test), this is
what it
does:
exec /usr/lib/jvm/java-6-sun-1.6.0.06/bin/java -classpath
/usr/share/groovy/lib/groovy-1.5.4.jar -Dscript.name=/usr/bin/groovy
-Dprogram.name=groovy
-Dgroovy.starter.conf=/usr/share/groovy/conf/groovy-starter.conf
-Dgroovy.home=/usr/share/groovy
-Dtools.jar=/usr/lib/jvm/java-6-sun-1.6.0.06/lib/tools.jar
org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain
--conf
/usr/share/groovy/conf/groovy-starter.conf --classpath .
HelloGroovy.groovy
In the first example we have groovy startup-time plus compile time,
in the second only startup-time. The Groovy startup-time is
significant as a lot of classloading is happening. As a side note:
The JRuby startup time is a couple of seconds, although they have
found a way to improve this in there next release. It is interesting
that the startup time is twice as long on your machine, although you
have a faster processor. Yet this is still not the complete story of
the slow performance of your gradle build. What I want to do
tomorrow, is to upload a snapshot version of Gradle which prints
timing information when started in debug mode. That way we should
learn about the other bottlenecks. I will ping you when I've uploaded
the new snapshot version.
- Hans
--
View this message in context: http://www.nabble.com/performance-
tp17504383p17510256.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email