Rails 1.2.6 慢的原因在这里
Posted by accesine on 2008-3-24 12:30:19 CST - 0 comments - 0 trackbacks
Rails 1.2.6 慢的原因在这里
http://izumi.plan99.net/blog/index.php/2008/03/18/performance-comparison-rails-126-vs-202/
I ran both applications in Mongrel (with the ‘production’ environment). The results of ‘ab -n 5000 http://localhost:3000/’ are as follows:
Rails 1.2.6: 141.19 requests/sec
Rails 2.0.2: 214.76 requests/sec
Wow, what a difference! Rails 2.0 is 50% faster in a dummy application!
In Rails 1.2, a lot of time is spent in the session store. Let’s see what happens if we specify “session :off” in both applications:
Rails 1.2.6: 189.51 requests/sec
Rails 2.0.2: 246.69 requests/sec
Wow! Even with sessions off, Rails 2.0 is still 30% faster! So the cookie session store isn’t the only thing responsible for the performance improvement!
Edge Rails has even more performance improvements. Things are definitely going the right direction.
http://izumi.plan99.net/blog/index.php/2008/03/18/performance-comparison-rails-126-vs-202/
I ran both applications in Mongrel (with the ‘production’ environment). The results of ‘ab -n 5000 http://localhost:3000/’ are as follows:
Rails 1.2.6: 141.19 requests/sec
Rails 2.0.2: 214.76 requests/sec
Wow, what a difference! Rails 2.0 is 50% faster in a dummy application!
In Rails 1.2, a lot of time is spent in the session store. Let’s see what happens if we specify “session :off” in both applications:
Rails 1.2.6: 189.51 requests/sec
Rails 2.0.2: 246.69 requests/sec
Wow! Even with sessions off, Rails 2.0 is still 30% faster! So the cookie session store isn’t the only thing responsible for the performance improvement!
Edge Rails has even more performance improvements. Things are definitely going the right direction.
tags: