It seems that the difference is caused by the internationalization. PluginAwareResourceBundleMessageSource
have different performances between dev and prod running modes. To find that I used Jvisualvm, profiling CPU in development and production modes.
To start Grails
set GRAILS_OPTS=-Xverify:none -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8500 -Dcom.sun.management.jmxremote.authenticate=false -
grails -Ddisable.auto.recompile=true -noreloading run-app
To start jvisualvm
jvisualvm -J-Xms1G -J-Xmx1G –cp:a path/to/app/target/classes
The profiling result should look like this