Configuring project with lots of groovy sources

I posted this question in "Community" section, but was told, that here is a place for groovy-related questions

So, reposting:

I have a webapplication project using Spring MVC. I use Groovy for controllers - that's cool, full hotswapping, easy to write, easy to handle xml, fast enough. But there's one major problem. Each application startup lasts long. I have ~300Kb groovy code. The optimistic result for startup is 70-80 seconds. That can be 3 mins, or more if the system is busy. Profiling showed that most of time it spends compiling groovy scripts on startup. And the groovy compiler performance is pretty low.
Maybe I can somehow reconfigure the project to keep groovy compiler from compiling all these 300K every application start?
I have all my scripts in WEB-INF/groovy directory, thus they're not treated as java sources. I instanciate groovy beans using
and constructor-arg for script name

Message was edited by:
Max Ishchenko

1 comment
Comment actions Permalink

I don't think we can do anything from the plugin side, it is just the compiler need to be more robust. AFAIK this performance improvement is indeed planned for groovy 1.6.



Please sign in to leave a comment.