[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

gem on macbook SLOW

huard.elise@gmail.com

3/13/2008 10:02:00 PM

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 ?
Thanks,

Elise
5 Answers

Gordon Thiesfeld

3/13/2008 10:34:00 PM

0

On Thu, Mar 13, 2008 at 5:05 PM, Elise Huard <huard.elise@gmail.com> wrote:
>
> Any ideas or similar experience ?
> Thanks,
>
> Elise

What version of RubyGems are you running? This behavior has been
improved in the newer versions (post 1.0, I believe).

hth,

Gordon

Aaron Patterson

3/13/2008 10:59:00 PM

0

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_...

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

--
Aaron Patterson
http://tenderlovem...

Chris Shea

3/13/2008 11:54:00 PM

0

On Mar 13, 4:02 pm, Elise Huard <huard.el...@gmail.com> 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 ?
> Thanks,
>
> Elise

You might want to check out this thread:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/4fc65c...

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).

HTH,
Chris

huard.elise@gmail.com

3/14/2008 12:22:00 PM

0

On 14 mar, 00:53, Chris Shea <cms...@gmail.com> wrote:
> On Mar 13, 4:02 pm, Elise Huard <huard.el...@gmail.com> 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 ?
> > Thanks,
>
> > Elise
>
> You might want to check out this thread:http://groups.google.com/group/comp.lang.ruby/browse_thread......
>
> 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).
>
> HTH,
> Chris

Thanks ! I'll try that tonight. Failing that, i'll check the
version, and upgrade if dated.
Best Regards,

Elise

James Tucker

3/16/2008 4:37:00 PM

0


On 14 Mar 2008, at 12:24, Elise Huard wrote:

> On 14 mar, 00:53, Chris Shea <cms...@gmail.com> wrote:
>> On Mar 13, 4:02 pm, Elise Huard <huard.el...@gmail.com> 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 ?
>>> Thanks,
>>
>>> Elise
>>
>> You might want to check out this thread:http://groups.google.com/group/comp.lang.ruby/browse_thread...
>> ...
>>
>> 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).
>>
>> HTH,
>> Chris
>
> Thanks ! I'll try that tonight. Failing that, i'll check the
> version, and upgrade if dated.
> Best Regards,
>
> Elise
>

Also, I have noticed that gem installs run significantly faster from a
machine in the western hemisphere (inside anywhere in the US).

Is there a need for more EU mirrors presently? Are the mirrors geo-
distributing correctly?