On 20 Dec 2010, at 13:54, Matt Hamilton wrote:

> Ok, here's a non job related post...
> 
> Anyone know why urllib.urlopen() can be so much slower than using ab to do 
> the same thing? I seem to be getting an extra 100ms latency on a simple HTTP 
> GET request of a static, small image.


Some more info on this... I've been tracing the packets with wireshark to try 
and see what is going on, and it looks like with urllib the data is returned 
pretty quickly, but there is then a 100ms delay as it seems to be shutting down 
the socket afterwards. I'm trying to work out why, but both urllib and ab 
appear to go through the same tcp dance to shut down the connection (both 
client and server send FIN).

-Matt


-- 
Matt Hamilton                                         ma...@netsight.co.uk
Netsight Internet Solutions, Ltd.          Business Vision on the Internet
http://www.netsight.co.uk                               +44 (0)117 9090901
Web Design | Zope/Plone Development and Consulting | Co-location | Hosting

_______________________________________________
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk

Reply via email to