Message94545
The readline() function in zipfile (in ZipExtFile) reads chunks of max
100 bytes (zipfile.py, line 525) into the linebuffer. A file of 500
MBytes therefore yields 5 million chunks.
Changing the value 100 to 10000 bytes boosts performance by magnitudes,
while it only requires 10k of memory.
My fix in zipfile.py, line 525:
buf = self.read(min(size, 10000)) # was 100 before
Best regards / Volker Siepmann |
|
| Date |
User |
Action |
Args |
| 2009-10-27 07:13:52 | volker_siepmann | set | recipients:
+ volker_siepmann |
| 2009-10-27 07:13:51 | volker_siepmann | set | messageid: <1256627631.57.0.724869251337.issue7216@psf.upfronthosting.co.za> |
| 2009-10-27 07:13:48 | volker_siepmann | link | issue7216 messages |
| 2009-10-27 07:13:47 | volker_siepmann | create | |
|