[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

TCPSocket#initialize slow on Windows

Victor 'Zverok' Shepelev

9/3/2008 8:27:00 PM

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.


1 Answer

Roger Pack

9/4/2008 6:01:00 PM

0

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
--
Posted via http://www.ruby-....