Charles-François Natali added the comment:

Hum...
Apparently, before this bug was fixed, glibc's getaddrinfo() would
retrieve the list of interfaces at every call, even if AI_ADDRCONFIG
was not set:
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=fa3fc0fe5f452d0aa7e435d8f32e992958683819

Which can mean a large overhead.
Also, from a quick look at the source, it will also retrieve the list
of interfaces if more than one address matches (e.g. for TCP, UDP, or
if AF_UNSPEC is passed).
So using getaddrinfo() could incur a non-negligible overhead.

So it might be better to just use inet_pton() instead.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18806>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to