From: Eric Hodel Date: 2007-11-15T19:43:05+09:00 Subject: Re: ruby incredibly slow (update 2) On Nov 14, 2007, at 19:30 , Ron Jeffries wrote: > On Wed, 14 Nov 2007 14:03:36 -0500, Eric Hodel > wrote: >> >> $ time ruby -rsocket -e 'p Socket.gethostbyname("127.0.0.1")' >> ["localhost", ["test"], 2, "\177\000\000\001"] >> >> real 0m0.042s >> user 0m0.010s >> sys 0m0.009s > > It's a solid 8 seconds on my machine. But ordinary web page access is > nothing like that. What is this telling us? Do you get the same result for the IP address (last field)? I have seen problems where DNS is confused only for 127.0.0.1 or localhost which leads to this terrible delay. Adding an entry to the hosts file sometimes fixes this, but I'm not sure where it lives on windows systems. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars