I'm using Grails 2.0. I used to develop under Grails 1.3.7 but when running an application under Grails 2.0 the performance is very slow. A page can take more than 30 seconds to show and it's very embarrassing and unproductive.
I googled and I found that GSPs in 2.0 are in some cases 10 times slower than 1.3.7 ; Greame explained that there is a new way of handling GSPs in dev mod, but when executing grails prod run-app I have almost the same problem.
What should I do to speed up development process ? I'm loosing too much time.
PS : My GRAILS_OPTS are "-server -Xmx600M -Xms600M -XX:MaxPermSize=250m -Dfile.encoding=UTF-8 -Dserver.port=9090"
I posted an small announcement on the mailing list about 20 minutes ago: http://grails.1312388.n4.nabble.com/GSP-Compilation-tt4632864.html#a4635595
This issue was fixed: http://jira.grails.org/browse/GRAILS-9423
Please test the performance of the latest 2.1.x snapshot build.
Try these
export GRAILS_OPTS="-server -noverify -XX:PermSize=256m
-XX:MaxPermSize=256m -Xmx600M -Xms600m -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true
-Dsun.reflect.inflationThreshold=100000"
For me, the trick was to set Xmx and Xms to the same value and set the PermSize and MaxPermSize to the same value. sun.reflect.inflationThreshold helps with the permgen. (http://jira.grails.org/browse/GRAILS-7878?focusedCommentId=66447&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-66447 in the Grails jira for the explanation)
btw. I filed this issue 10 mins ago: http://jira.grails.org/browse/GRAILS-9444 If it's interesting, please vote on the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With