Now, I installed ruby from ubuntu repos/ppa, which I am not sure it
provided the latest ruby. So I removed everything and installed rvm.
Installed ruby 1.9.2-p136 and had same issue. Then installed ree 1.8.7,
and did not have the issue. It's much faster. I will watch closely the
-core mailing list for a possible resolution, but for now, I will use
ree.
This issue in 1.9.2 was affecting me enough that I switched back to 1.8.7, but not without doing a bit of research in to what the problem was.
We see a performance loss in 1.9.2 as it exhibits the correct behaviour when calling require, whereas 1.8.7 is reliant on incorrect semantics that are not acceptable for production use. I was never affected by these incorrect semantics, but I suppose ruby-core has to right these things or accept the long term technical debt.
Something called gem_prelude was added to ruby 1.9 as kludge to address some performance issues.
Ryan David explain (from the ruby-core list):
It (gem_prelude) was created to address a symptom, namely, that rubygems was slow on some systems (and proportional to the number of gems you have installed).
The good news is: a patch was committed (Jan 14) to ruby that should address some of the performance issues we're seeing. Namely, 1.9.2 users will be able to upgrade to rubygems 1.4 which offers some improved performance.
I don't know when we'll see the next ruby release, but I'm encouraged to see some progress. I'm also encouraged to see that there are members of the ruby-core team actively investigating and addressing these issues.
Hi, in order to put your numbers below into context, can you post the
spec for your hardware?
Thanks,
-Conrad
I was running the test on my laptop (core 2 duo 1.86ghz + 2gb ram +
5400rpm hdd). I might run the same test on my desktop (quad core 3.2 ghz
+ 4gb + 10000 rpm drive).
Also, with rvm, I think I can install ruby from head, see if it improves
the performance problem.