Feature Requests item #27612, was opened at 2009-12-22 17:38
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=578&aid=27612&group_id=126
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Roger Pack (rogerdpack)
Assigned to: Nobody (None)
Summary: faster bins
Initial Comment:
I was wondering if there would be any acceptance of a patch that would make
binaries faster if a default gem version is specified.
If we assume that gem paths don't change [and they shouldn't], then we can get
this type of speedup
1.9.1p376
2.25s originally
0.08 ruby startup itself
1.93 for Gem.binpath
0.28 to actually load the file
goes down to
0.37s
0.08 ruby startup [includes gem prelude]
0.29 execute
1.8.6
0.92 originally
0.75 require rubygems
0.09375 execute
goes down to 0.26
0.03 gem prelude for 1.8
0.08 execute
Here is something like what the bins would look like [in windows, but hey].
1.8
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
require 'rubygems'
gem 'whichr', version
load Gem.bin_path('whichr', 'whichr', version)
else
require 'gem_prelude'
load "c:/ruby18/lib/ruby/gems/1.8/gems/whichr-0.3.2/bin/whichr"
end
1.9
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
require 'rubygems'
gem 'whichr', version
load Gem.bin_path('whichr', 'whichr', version)
else
load
"C:/installs/ruby19_mingw/lib/ruby/gems/1.9.1/gems/whichr-0.3.2/bin/whichr"
end
Thoughts?
Thanks.
-r
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=578&aid=27612&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers