xmlrpc slow in windows 7 if hostnames are used

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Feb 5 02:13:36 CET 2010


En Thu, 04 Feb 2010 19:34:20 -0300, News123 <news123 at free.fr> escribió:

> I wrote a small xmlrpc client on Windows 7 with python 2.6
>
> srv = xmlrpclib.Server('http://localhost:80')
>
> I was able to perform about 1 rpc call per second
>
>
> After changing to
> srv = xmlrpclib.Server('http://127.0.0.1:80')
>
> I was able to perform about 10 to 16 rpc calls per second.
>
> So it seems, that under windows 7 the host name lookup occurs for every
> RPC call

Not necesarily. There is another difference: 127.0.0.1 is an IPv4 address,  
localhost maps to both IPv4 and IPv6 addresses (::1)

I vaguely remember a problem with that - IPv6 is tried first, doesn't  
work, only then IPv4, and that slows down the whole process.
Try disabling completely the IPv6 stack, if you don't need it.

-- 
Gabriel Genellina




More information about the Python-list mailing list