grails 2 / groovy 2 / JDK7: how to reap the benefits?
Asked Answered
A

1

9

I really love Grails but I was wondering how to get the performance benefits of Groovy 2. The question is how to configure the development and production environments in order to get that "close to Java" performance boost.

So, if I setup:

* JDK 7
* Groovy 2 (indie JAR to use invokedynamic)
* Grails 2.2

are there any guidelines in order to really speed my webapp out-of-the-box?

And do I need to do any re-factoring in my Grails webapp codebase? I mean that dependency injection stuff like referencing services in controllers should be statically compiled or should I keep writing code as the docs say?

ps: I guess Groovy @CompileStatic and Grails might be a relevant question...

Aceves answered 4/4, 2013 at 6:12 Comment(1)
yeap, Tim thanks! it's not rip, but reap...Aceves
B
5

It depends on what might be slowing your web application down :) I know "it depends" is so often the answer, but it's still true.

Anyway, I've asked around and it seems that Grails and invokedynamic won't go together just yet. The reloading agent needs updating and there may be problems with the cglib/asm libraries used by Hibernate.

Regardless, internally Grails is making more and more use of @CompileStatic (for the stuff that wasn't already written in Java), so unless your app is doing a lot of work itself, you're unlikely to see a big boost with invokedynamic.

It would be useful to have some official information on this, but it's not out there right now.

Bandbox answered 5/4, 2013 at 13:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.