[Tutor] Windows vs Linux processing speed.
Steven D'Aprano
steve at pearwood.info
Sat Oct 15 01:01:11 CEST 2011
Tony Pelletier wrote:
> So, my question is. Why is it running so much faster on linux? Is it the
> way that linux is handling the socket? Does windows open and close it
> whereas linux might leave it open and just pump data through?
Perhaps; you'll have to read the source code to see if there are
differences in geopy, or in the code that it relies on. But I suspect
you *might* be seeing this bug:
http://www.mail-archive.com/python-dev@python.org/msg40692.html
It's a long thread, but the summary is: reading data over the Internet
on Windows using some versions of Python is *sometimes* EXTREMELY slow
compared to Linux or third party tools. This is due to a bug in the
httplib module, which used a naive way of concatenating many little
strings. Most of the time, Python has an optimization that can disguise
how slow this is, but occasionally the optimization can fail.
--
Steven
More information about the Tutor
mailing list