[New-bugs-announce] [issue10376] ZipFile unzip is unbuffered

James Hutchison report at bugs.python.org
Tue Nov 9 16:51:55 CET 2010

New submission from James Hutchison <jamesghutchison at gmail.com>:

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
27432 reads done
took 0.859 seconds
start buffered Zipfile read
27432 reads done
took 0.072 seconds
start normal read (default buffer)
27432 reads done
took 0.139 seconds
start buffered normal read
took 0.137 seconds

assignee: docs at python
components: Documentation, IO, Library (Lib)
messages: 120871
nosy: Jimbofbx, docs at python
priority: normal
severity: normal
status: open
title: ZipFile unzip is unbuffered
type: performance
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list