Re: Socket.getaddrinfo and IPSocket.getaddress super slow?

Anyone know why Socket.getaddrinfo and IPSocket.getaddress take up to 3
seconds to return when the host doesn’t have a record in DNS?

They seem to do reverse DNS lookups on occasions where you might not
want
them to (e.g. finding the IP address to which a socket is bound). Try
adding
to the top of your program:

require ‘socket’
Socket.do_not_reverse_lookup=true

Brian C. wrote:

Anyone know why Socket.getaddrinfo and IPSocket.getaddress take up to 3
seconds to return when the host doesn’t have a record in DNS?

They seem to do reverse DNS lookups on occasions where you might not
want
them to (e.g. finding the IP address to which a socket is bound). Try
adding
to the top of your program:

require ‘socket’
Socket.do_not_reverse_lookup=true

The Zeroconf (avahi) mDNS service seems to pretty well bone things up on
Ubuntu 7/8 as well. You might want to shut it off and see what happens
(it seems to be running by default) you’re hanging out with zoo
critters.