[python-uk] urllib latency

John J Lee jjl at pobox.com
Tue Dec 21 20:49:26 CET 2010

On Tue, 21 Dec 2010, Matt Hamilton wrote:
> And then re-running the tests from the same python prompt that was open 
> just before I wrote that email and I now have the 100ms delay back 
> again... yet not still in ab. Quitting and starting a new python process 
> and I still have the delay.

I guess this is obvious advice, but then again we all need the obvious 
stated from time to time: Since it seems to be tricky maybe a more 
mechanical approach would help -- reproduce it with a script that just 
uses module socket, then reproduce it with the equivalent C program if 
necessary?  Then if it's still not apparent, to keep zeroing in on what is 
different between ab and your script, you can go in the other direction, 
simplifying the ab code drastically, until your two programs are identical 
apart from the one thing that makes the Python code slower (hopefully 
you'll spot the problem before that happens ;-).


More information about the python-uk mailing list