A small project for the weekend has been to upgrade a project from #grails 1.3.7 to 2.0.3. The upgrade was more or less without problems, but I thought I'd do a very basic #performance comparison between the two versions.

As usual with these things, the numbers are very dependent on my local environment, but I would expect the factors to be the same in other environments and for other projects.

The bad part of Grails 2.0.3 is that it apparently takes quite a while longer to start up:
Startup time for grails 1.3.7 run-app: 1:01
Startup time for grails 2.0.3 run-app: 1:49

From a quick glance of a thread dump while starting up, it looks as if AspectJ is doing a lot of classpath scanning. The final war file is about 80 mb, so there are quite a lot of jar files in there.

At runtime, however, Grails 2.0.3 seems to be a little faster. For static css files it's actually quite a lot faster (resources plugin not enabled). For serving simple GSP pages, the difference is not very big.

Grails 1.3.7, grails prod run-war:
ab -n 1000 -c 50 http://localhost:8080/css/prettify.css: 141 reqs/sec
ab -k -n 500 -c 10 http://localhost:8080/: 47 reqs/sec

Grails 2.0.3, grails prod run-war:
ab -k -n 1000 -c 50 http://localhost:8080/css/prettify.css: 220 reqs/sec
ab -k -n 500 -c 10 http://localhost:8080/: 57 reqs/sec
Shared publiclyView activity