[Python-Dev] how to debug httplib slowness

Guido van Rossum guido at python.org
Wed Aug 12 18:10:57 CEST 2009


On Wed, Aug 12, 2009 at 8:34 AM, Chris Withers<chris at simplistix.co.uk> wrote:
> Guido van Rossum wrote:
>>
>> Try instrumenting the actual calls to the lowest-level socket methods
>> (recv() and send()) and log for each one the arguments, return time,
>> and how long it took.
>
> Can I do that in python code?

Probably if you hack on the socket.py file long enough.

>> You might see a pattern. Is this on Windows?
>
> Well, yes, but I'm not 100%. The problematic machine is a Windows box, but
> there are no non-windows boxes on that network and vpn'ing from one of my
> non-windows boxes slows things down enough that I'm not confident what I'd
> be seeing was indicative of the same problem...

Time to set up a more conclusive test. Do you have something like curl
or wget available on the same box?

>> It's embarrassing, we've had problems with socket speed on Windows
>> since 1999 and they're still not gone... :-(
>
> Oh dear :-(

Well it may be that it's really just your box. Or proxy settings. Look
into proxy settings.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list