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.
On Fri, Mar 14, 2008 at 07:05:24AM +0900, Elise H. wrote:
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).
I had the same problem, but only after updating to Leopard. In that
thread I mention changing my DNS servers, but I’ve dropped that part
of the solution. Basically, what I did was disable IPv6 (System
Preferences → Network → Advanced → TCP/IP → Configure IPv6) and
add “require ‘resolv-replace’” to my copy of gem at /usr/local/bin/gem
(of course, that goes away after gem update --system).