Message120871
The Unzip module is always unbuffered (tested v.3.1.2 Windows XP, 32-bit). This means that if one has to do many small reads it is a lot slower than reading a chunk of data to a buffer and then reading from that buffer. It seems logical that the unzip module should default to buffered reading and/or have a buffered argument. Likewise, the documentation should clarify that there is no buffering involved when doing a read, which runs contrary to the default behavior of a normal read.
start Zipfile read
done
27432 reads done
took 0.859 seconds
start buffered Zipfile read
done
27432 reads done
took 0.072 seconds
start normal read (default buffer)
done
27432 reads done
took 0.139 seconds
start buffered normal read
done
27432
took 0.137 seconds |
|
Date |
User |
Action |
Args |
2010-11-09 15:51:55 | Jimbofbx | set | recipients:
+ Jimbofbx, docs@python |
2010-11-09 15:51:55 | Jimbofbx | set | messageid: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> |
2010-11-09 15:51:47 | Jimbofbx | link | issue10376 messages |
2010-11-09 15:51:47 | Jimbofbx | create | |
|