[Pythonmac-SIG] socket.getaddrinfo problems
Dudley Carr
dudley at cs.stanford.edu
Thu Apr 15 23:29:37 EDT 2004
Chris Ryland wrote:
> This came up on Python-Dev a while back--you could google for it.
>
> A big discussion ensued, but it fizzled out in the end, IIRC.
>
> The bottom line is that you'd really have to do your own DNS caching. I
> guess some other Unix-like systems do that at the library level.
>
There's this SourceForge bug report that looks to be still open that explains
some of the getaddrinfo slowness:
http://sourceforge.net/tracker/index.php?func=detail&aid=774751&group_id=5470&atid=105470
DNS caching would certainly improve subsequent queries for the same domain.
However, what I tried to point out with the timings is that I get these rather
large spikes (17 seconds) which I don't attribute to general slowness of
getaddrinfo on OS X. The example only used yahoo.com. However, when I did twenty
different getaddrinfo queries for different domains, I still saw those spikes
consistently happening after 10 or so queries. I have to attribute it to my
network setup because the two other timings by other people didn't show the
large spikes that I am seeing.
Regards,
Dudley
More information about the Pythonmac-SIG
mailing list