public
Description: A helper to dramatically speedup the time it takes to run a 'require rubygems'
Homepage:
Clone URL: git://github.com/rdp/faster_rubygems.git
rdp (author)
Tue Nov 03 11:17:55 -0800 2009
commit  073850850256dd1ec165dc165ee87763254d4b05
tree    6d755c023b35cf2091bc526a07592dde5b92d049
parent  9e5d0bedb06f9c24291609a52202acebefd77d71
name age message
file README Wed Oct 28 11:23:28 -0700 2009 allow for RVM users [rdp]
file Rakefile_unused Tue Nov 03 11:17:55 -0800 2009 renamings [rdp]
file VERSION Thu Oct 29 15:11:02 -0700 2009 update install script [rdp]
directory examples/ Sat May 23 16:30:35 -0700 2009 resolve conflicts [rdp]
directory ext/ Tue Nov 03 11:17:55 -0800 2009 renamings [rdp]
file faster_rubygems.gemspec Tue Nov 03 11:17:55 -0800 2009 renamings [rdp]
file install.rb Thu Oct 29 15:16:03 -0700 2009 update install script [rdp]
directory lib/ Tue Nov 03 11:17:55 -0800 2009 renamings [rdp]
README
A helper to dramatically speedup the time it takes to load rubygems

i.e. "require 'rubygems'" no longer has to sap valuable time from your life.

inspired by a request from Yehuda Katz [1] and 1.9's fast gem_prelude.

Speed difference (windows box, lots of gem):

$ time ruby examples/require_rubygems_normal.rb

real    0m1.109s

$ time ruby examples/require_fast_start.rb

real    0m0.500s

Yea! Finally ruby script startup times that don't spend forever just reloading gem paths.

It acts about the same as gem_prelude (prelude is 1.9 only currently) -- adds the paths of the highest version of each 
gem into your load path so they're ready to be required.

== installation ==

git clone git://github.com/rdp/faster_rubygems.git
ruby faster_rubygems/install.rb # done

== usage ==
require 'frubygems'
or
require 'rubygemsf'

(both do the same thing).

If you were really clever I suppose you could figure out how to override the default rubygem behavior to do this, always 
:)

== Speed differences == 

For those interested, speed difference example on linux (250 gems):
$ time ruby examples/require_rubygems_normal.rb
ruby examples/require_rubygems_normal.rb  0.57s user 0.05s system 85%
cpu 0.726 total

$ time ruby examples/require_fast_start.rb
ruby examples/require_fast_start.rb  0.04s user 0.02s system 46% cpu
0.121 total

Note also that a few non conforming gems require the use of require 'rubygems' no matter what (they're pretty rare, 
though--you probably won't run into them, and I'm not aware of any).

Note: you don't need this for ruby 1.9, which already preloads via gem_prelude, but it won't hurt to use it in 1.9--it 
defaults to a no-op, so doesn't hurt.

Related projects:

http://github.com/fabien/minigems/tree/master
1.9's gem_prelude
http://www.ruby-forum.com/topic/191673

Author may be reached via github rogerdpack

[1] http://rubyforge.org/tracker/index.php?func=detail&aid=21288&group_id=126&atid=578