[Tutor] Windows vs Linux processing speed.

Tony Pelletier tony.pelletier at gmail.com
Fri Oct 14 18:45:57 CEST 2011


Hi,

I have a question regarding the speed of my program on linux in comparison
to windows.

I'm using geopy and contacting Google for geocodes for records in a csv I
created.  Like such:

 try:
        reader = csv.reader(open(filename, "r"))
        for row in reader:
            if row: # Checking to see if it's a valid row so it doesn't blow
up on an empty row.
                username, address, address2, city, state, zip, country =
row[0:7]
                location = address + ', ' + city + ' ' + state + ' ' + zip +
' ' + country
                try:
                    place, (lat, lng) =  g.geocode(location) # Contact
Google for Geocodes

I mainly use windows, but I tend to use Arch Linux at home.  When I run it
via windows, it's relatively slow and didn't really bother me, but when I
ran it at home I got through 15 or so and got a message back from google
saying  I was exceeding the allowed amount.  Or something to that effect.
 Basically, I was exceeding the 10 per second that's allowed.

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?

It's not really a problem since I just added sleep time, but I'm curious.

Thanks
Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111014/a3d46232/attachment.html>


More information about the Tutor mailing list