From: Ron Jeffries Date: 2007-11-15T21:00:00+09:00 Subject: Re: ruby incredibly slow (update 2) On Thu, 15 Nov 2007 05:43:05 -0500, Eric Hodel wrote: >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 don't understand the question. > >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. I know where the hosts file is ... it looks like this: 127.0.0.1 localhost 127.0.0.1 www.mycookbook.com 127.0.0.1 typo But I don't understand what you might be getting at with respect to changing it. I believe that hosts just contains some locally-specific redirects, does it not? Thanks, Ron Jeffries www.XProgramming.com