Stefan put the new version into practice by comparing Rails 1.1-stable and 1.2-stable with a test suite made of simple rendering, action cached and session creation. The suites were run with different session options using pstore, ActiveRecordStore and SqlSessionStore.
From those tests, Stefan found out that 1.2-stable was about 20% slower than version 1.1. The full report comes with remarks and advise:
The question perhaps remains: Did the Rails core team sacrifice performance for features on Rails 1.2? Will there be focus on performance for the next stable release?
- Previous reports on Rails 1.2 being twice as slow as Rails 1.1 are performance FUD
- Action caching could use some attention
- Never use pstore as your session container
- With the current Ruby interpreter it seems impossible to avoid slowdowns as the code base of Rails grows, due to slow GC and large interpreter overhead. YARV might change this.
Community comments
Unsubstantiated Claims...
by Sam Smoot,
If 1.1 was good enough for you...
by Michael Neale,
Ruby and concurrency
by Scott Fraser,
Unsubstantiated Claims...
by Sam Smoot,
Your message is awaiting moderation. Thank you for participating in the discussion.
Rails creates a lot of objects it doesn't need to. It seems that the language and GC is catching some of the flak for this undeservedly.
If 1.1 was good enough for you...
by Michael Neale,
Your message is awaiting moderation. Thank you for participating in the discussion.
then 1.2 will be just fine. Just use it, the features are probably worth it.
Ruby and concurrency
by Scott Fraser,
Your message is awaiting moderation. Thank you for participating in the discussion.
It appears that these benchmarks are a single threaded client, is that correct? In other words when the test was "run 5000 times", it was 5000 serial calls to the web server. As opposed to 5000/X calls made by X number of clients all at the same time.
I am curious about how Ruby performs under a multi-threaded load - can anyone comment?
thanks
Scott Fraser