pleased to announce release of faster_rubygems 0.0.1
A helper to dramatically speedup the time it takes to run
inspired by a request from Yehuda K.  and gem_prelude (and not
knowing if such a utility already existed or not…)
Example speed difference:
bash-3.1$ time ruby examples/require_fast_start.rb
bash-3.1$ time ruby examples/require_rubygems.rb
Yea! Finally ruby script startup times that don’t spend forever just
reloading gem paths.
It acts about the same as gem_prelude does (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 ==
How to install (manual for now–with any interest I could make it
find your rubygems.rb file:
ex from ubuntu:
copy some files into that same directory:
git clone git://github.com/rogerdpack/faster_rubygems.git
cp faster_rubygems/rubygems_*.rb /usr/local/lib/ruby/site_ruby/1.8
== usage ==
require ‘rubygems_f.rb’ # shortcut to the first method.
Though if you were really clever I suppose you could figure out how to
override the default rubygem behavior to do this, always:)
Speed difference example on linux:
$ time ruby examples/require_rubygems.rb
$ time ruby examples/require_fast_start.rb
So better but not “such a big deal” as it is on windows boxes (where it
can use up to 50% of script time). Also note that that’s on warm
start–cold start might show higher differences. And it’s still a 4x
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).