httplib request is slow on read()
jdhunter at nitace.bsd.uchicago.edu
Tue Dec 4 01:27:27 CET 2001
I am using httplib to make a direct GET request, and then dumping the
data to file with
of = open('temp.dat', 'w')
f = h.getfile()
data = f.read()
of.write( h.getfile().read() )
where h is the httplib object.
The read() part is really slow. When I request the same data from my
browser, it loads very quickly, which suggests to me that there may be
a faster way to get this data into the file.
I don't know if read() is waiting for some end of file that is
delayed... or what...
More information about the Python-list