README in faster_rubygems-0.2.1 vs README in faster_rubygems-0.5.1
- old
+ new
@@ -1,58 +1,67 @@
-A helper to dramatically speedup the time it takes to load rubygems
+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.
+i.e. it makes it so that "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.
+Yea! Finally ruby script startup times that don't spend forever just reloading gem specs every single time...
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.
+It is also good for 1.9 makes script startup faster. To use it with 1.9 do an
+$ export RUBYOPTS=-rfaster_rubygems
+
+somewhere.
+
== installation ==
-git clone git://github.com/rdp/faster_rubygems.git
-ruby faster_rubygems/install.rb # done
+$ gem install faster_rubygems
== usage ==
-require 'frubygems'
-or
-require 'rubygemsf'
-(both do the same thing).
+1.9:
+$ export RUBYOPTS=-rfaster_rubygems
-If you were really clever I suppose you could figure out how to override the default rubygem behavior to do this, always :)
+1.8:
-== Speed differences ==
+require 'faster_rubygems'
+at the top of your script, or install it to be used by default thus:
+>> require 'rubygems'
+>> require 'faster_rubygems/install'
+>> FasterRubyGems.install_over_rubygems! # installs this to be the default for rubygems
+
+
+# later, to revert back to normal, should you so desire:
+>> require 'rubygems'
+>> require 'faster_rubygems/install'
+>> FasterRubyGems.uninstall_over_rubygems!
+
+If all else fails, you can reinstall rubygems by running setup.rb from within its package: http://rubyforge.org/frs/?group_id=126
+
+== More Speed Comparisons ==
+
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
+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
+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
+1.9's gem_prelude.rb
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
+Source/contact:
+http://www.github.com/rdp/faster_rubygems
\ No newline at end of file