Hi all,

the performance problems of the 0.2 release Ittay has pointed out made me refactor important bits of the gradle core from Groovy into Java. The problem is solved now (in my local working copy), although there is still room for further improvement. One way of further improving performance is to rewrite the other gradle core classes in Java. This has also a couple of other benefits:

- Rewriting the core into Java would be necessary anyway as soon as we want to support additional build script languages (e.g. Jython, JRuby). - Profiling Groovy code is very hard (the same would be true for any other dynamic language on the JVM). This is caused by the dynamic method dispatch. I don't know if it possible to improve the profiling tools to better support dynamic languages. Right now it is a pain. - The Groovydoc tool is not production ready and it is unclear when this is the case. Therefore Gradle can't provide reasonable API docs at the moment. Obviously with Java that would not be a problem. - Reporting is better. For example the code coverage tools don't work that well with Groovy. They give you a number but this number is not necessarily correct.

As Groovy is so close to Java, refactoring the Groovy code into Java is rather easy. I'm a bit sad of having to give up some very nice Groovy language elements, but that is the way it is. We will end up with only a small Groovy layer left, responsible for applying the build script against the Gradle objects. This layer would constitute our Groovy build script engine. It should be very easy then to add other build script engines for any other dynamic JVM language capable of calling Java code and creating Java objects (e.g. coercing a closure to a Java interface).

I should be done with the refactoring sometimes next week. The only change for the users will be better performance and a usable API doc.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to