On Tue, Jan 4, 2011 at 6:48 PM, Ryan Davis <ryand-ruby / zenspider.com> wrote:
> Can we get approval for a release of 1.9.2pXXX with this change?
>
> Since nobody has disapproved. Should I move forward on this change?

I'm not a particular fan of gem_prelude, but even with recent fixes
require 'rubygems' does incur a startup hit.

This is on JRuby, with a large number of gems installed (around 500):

~/projects/jruby time jruby -e 1

real	0m0.667s
user	0m0.579s
sys	0m0.086s

~/projects/jruby  time jruby -e "require 'rubygems'"

real	0m1.077s
user	0m1.047s
sys	0m0.125s

And this is not necessarily because of a lot of gems. If I wipe out
all the gems (by moving the whole lib/ruby/gems/1.8/gems dir somewhere
else) the time is largely unchanged.

Granted, JRuby starts up slower than 1.9, but this decision will
obviously impact JRuby, forcing all JRuby users to accept an even
slower base startup than they have right now.

I'll see if I can investigate what else is taking up time, but I
suspect a lot of it is simply the cold JVM performance for parsing and
executing interpreted code.

- Charlie