Python urllib.urlretrieve vs. Perl getstore

Dave Brueck dave at pythonapocrypha.com
Fri Nov 15 12:08:08 EST 2002


Adam S wrote:
> 
> I have a Perl and a Python version of a program designed to fetch
> large files (40MB) from a remote HTTP server.
> 
> Initial tests indicate that the Perl version, using getstore()
> is 3-4 times faster than the Python version. Is there a reason
> for this and is there another Python library HTTP file fetch
> function I can use? I don't want to use FTP as there
> is no anonymous logon for this server.

40 MB files? Hmm... maybe is urllib pulling the entire file into memory?  
If so, the slowdown might have nothing to do with the network and
everything to do with the OS swapping memory to disk.

-Dave





More information about the Python-list mailing list