

Rails master is now 4.0.0.beta; Ruby 1.8.7 support dropped - utkarshkukreti
http://weblog.rubyonrails.org/2011/12/20/rails-master-is-now-4-0-0-beta/

======
evdawg
Rails needs to do a release solely focused on speed. Dropping 1.8.7 is a good
step for a lot of people, but I feel Rails itself has gotten slower since 2.x
and I know a lot of people would agree with me.

I do a lot of work in CodeIgniter as well as Rails (w/ Ruby 1.9.2 in
production), and there's no doubt that my CodeIgniter apps _on slower servers_
with little-to-no deliberate optimization are faster than my Rails apps.

For just one particular example, I have found rendering partials in Rails are
such a point of poor performance that I have often found myself avoiding it.

There's this red herring (and a pet peeve) that making the framework 'less
bloated' by dropping components or making them optional equals performance.
You'll even see a comment on this blog post asking which components to remove
to improve performance! It doesn't work that way when the core components of
Rails remain slow.

While the speed of Rails had Ruby 1.8.7 to blame for a long time, now that
it's being dropped I think 4.0 has a unique opportunity to optimize for 1.9
and make a big difference to the overall speed of the framework.

~~~
cvshepherd
> For just one particular example, I have found rendering partials in Rails
> are such a point of poor performance that I have often found myself avoiding
> it.

A good caching plan obviously helps with these kinds of issues.

> There's this red herring (and a pet peeve) that making the framework 'less
> bloated' by dropping components or making them optional equals performance.

In the case of Controllers, inheriting from ActionController::Metal and not
including unnecessary modules, speeds things up a lot.

In general Rails may be slow in comparison to other frameworks. But that
doesn't mean it's too slow. I don't really care if my app only manages 5000
requests per second, versus framework x's 6000 or more on the same hardware.

~~~
moe
_I don't really care if my app only manages 5000 requests per second, versus
framework x's 6000 or more on the same hardware._

Nitpick: Your numbers are a little off. Rails/REE tops out at around ~300
reqs/sec on a current commodity box (16 cores/16G). This is of course
application-dependent and optimization can squeeze it some, but it's a
different ballpark.

When you look outside of ruby-land you can indeed find frameworks that will
handle your 6000/sec on the same hardware (e.g. twisted, node, some of the
evented java-frameworks).

So, depending on what you compare to rails, the difference can easily be an
order of magnitude.

~~~
cvshepherd
When you use Metal endpoints, as i mentioned in my comment, 6000 requests per
second is actually very possible. Yes, you need a lot of resources, but I
didn't suggest otherwise. And yes, on this hardware other frameworks will
manage even more requests.

EDIT: My low budget netbook just gave me 327 req/s with an out of the box
Rails config, and running the benchmarking tool on the same machine.

------
vinhboy
Thank goodness for RVM. Can't imagine what I would do without it...

~~~
getsat
There's also rbenv, which doesn't override your shell functions or require
modifications to your deployment code. Patching basic shell functions like
"cd". In 2011. I _seriously_ hope you guys don't do this.

Here's the rbenv project page: <https://github.com/sstephenson/rbenv#readme>

It's functionally equivalent to rvm minus the aforementioned negatives.

~~~
silversmith
Except it does not handle neither installation (available via ruby-build), nor
gemsets (has a plugin).

~~~
tonycoco
Who needs gemsets? Isn't that the point of Bundler?

~~~
boundlessdreamz
Gemsets are still useful. see [http://tenderlovemaking.com/2011/11/30/psa-the-
number-of-gem...](http://tenderlovemaking.com/2011/11/30/psa-the-number-of-
gems-installed-on-your-system-can-impact-rails-boot-time/)

~~~
latortuga
Thank you for this, I did not realize it was the case but it definitely makes
sense. Back to using gemsets I suppose...

------
prpatel
In case you guys missed it, there was a recent HN article on the speed
improvements in jruby + jdk 1.7. I too lament the slowness of Rails - and
before you throw the usual arguments at me about perf being relative and 'good
enough' blah blah - the ruby/rails community should have seriously addressed
this _long_ ago. I've only started with rails recently (this year) and am
experimenting with jruby since my patience has worn thing with ruby's speed.

