Graeme and I put a little work into getting some initial figures comparing Grails and Rails performance.
Grame has put these together into a benchmark document on grails.org
I fully expect a bit of a firefight over some of this but tried to be as fair as we know how – we are certainly not Rails experts so there may be some idiomatic approaches/tuning that can be done. However we didn’t necessarily optimise the Grails tests maximally either… so I am sure debate will range for some time. We always believed we would see this kind of result because of Java and Groovy’s non-interpreted nature – despite performance improvements being required in some areas of Groovy dynamic method invocation and string handling. Hibernate and the mature Java VM are also paying dividends for us.
We did find during the tests that there is some performance tuning to do with GSP view rendering, as there appear to be some bottlenecks related to heavy taglib usage.
Here’s the requests per second result for 1000 requests across 50 concurrent clients, updating 3 random records (doman objects) and returning a programmatically generated XML response:
In a nutshell, in each of these tests, Grails mean request time is lower than Rails in every case, in some by quite a bit. Grails has not been optimized to any degree yet.
I just hope people realise this isn’t intended to start a flame war. People are asking us for figures, and here are some. Of course if comparing Grails to a pure Java application we might see better performance for pure Java than Grails, but this is not a like for like test. To a degree the mantra with these new-generation frameworks like Rails an Grails is that you are happy to trade off a little performance for massively enhanced productivity. Shorter time to market etc.