Victor 'Zverok' Shepelev
9/5/2008 9:38:00 AM
From: rogerpack2005@gmail.com [mailto:rogerpack2005@gmail.com]
Sent: Thursday, September 04, 2008 9:01 PM
>
>Victor 'Zverok' Shepelev wrote:
>> ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32_71]
>>
>> TCPSocket.new('localhost', 80) takes something like 1.5-2 sec each call.
>> (Test program only consists of profiling of this line with ruby-prof).
>>
>> Can this be a bug or result of my misunderstanding of something
>> fundamental?
>>
>>
>> Thanks.
>>
>> V.
>
>Could try
>require 'resolv-replace' before hand, or using 127.0.0.1 instead of
>localhost.
>-=R
Seems to work... today :)
I've kinda tried 127.0.0.1 and it was the same slow... and after I've tried
your advice and required 'resolv-replace', all things became fast. But then,
when I commented out "require 'resolv-replace'", they are still fast. I'm
slightly shocked for now. Are there any explanations, or just it some kind
of network magic I'll never debug about?
Anyway, thank you for advice.
V.