On Fri, Mar 14, 2008 at 07:05:24AM +0900, Elise Huard wrote:
> Hello,
> 
> i've got a brand new Macbook Pro.
> I've got ruby 1.8.6, as well as the usual gems.
> However, running gem install, or even rspec (which uses gem) takes a
> long time (2 minutes).  I've tried debugging, and got as far as
>    updated = @source_index.update source_uri
> in source_info_cache_entry.rb, which seems to take a while (there
> might be other slow parts, that's just one of them).
> It all works, but for rspec for instance it's quite annoying to have
> to wait that long.
> I tried profiling but that didn't yield anything that i could parse.
> 
> Any ideas or similar experience ?

Yes.  Ruby gems does not use keep alive connections when fetching data
from the remote gem server.  I worked with Eric to fix gems to use keep
alive connections and it was about 10x faster (IIRC).

  http://rubygems.rubyforge.org/svn/trunk/lib/rubygems/remote_fetcher.rb

You should see a huge speed improvement on the next release of Rubygems.

-- 
Aaron Patterson
http://tenderlovemaking.com/