26 Aug 2004 09:13
Re: Long instantiation time for compiled Groovy classes
On 26 Aug 2004, at 07:05, Arik Kfir wrote:
> A small follow-up – I noticed now that groovyc does not fail on
> unknown variables/types, which means that the class’s script is not
> really compiled, but rather saved into the compiled class and is still
> compiled at runtime – is this correct?
No - its just resolving variables is often dynamic if there is not a
field accessible in the class/script in which you use a variable.
e.g. it will use a getProperty("someName") rather than this.someName if
there is no field or getter available.
> From: Arik Kfir [mailto:arikkfir@...]
> I’m a new (and pleasantly surprised!) Groovy user. I’ve successfully
> executed various scripts and classes and recently I’ve pre-compiled my
> Groovy classes, to make them run a little faster. I’ve noticed,
> however, that instantiation of compiled Groovy classes takes about
> three-to-four seconds, which surprised me a bit, as this was supposed
> to be a compiled script.
Could you give an example of this? Sounds very bizarre. Compiled groovy
classes are java classes, there's nothing really to start up :)
James
-------
http://radio.weblogs.com/0112098/
RSS Feed