[issue7471] GZipFile.readline too slow
Nir Aides
report at bugs.python.org
Thu Dec 17 23:23:34 CET 2009
Nir Aides <nir at winpdb.org> added the comment:
How about using the first patch with the slicing optimization and
additionally enhancing GzipFile with the methods required to make it
play nice as a raw stream to an io.BufferedReader object (readable(),
writable(), readinto(), etc...).
This way we still get the 350% speed up and keep it fully backward
compatible, and if someone needs the extra performance they can feed it
into an io.BufferedReader object thus:
g = gzip.GzipFile(...)
r = io.BufferedReader(g)
for line in r:
...
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7471>
_______________________________________
More information about the Python-bugs-list
mailing list