Antoine Pitrou <pit...@free.fr> added the comment:

> Attached result of a run with stdlib gzip module only. Results
> indicate that performance still is as bad as on Python 2. The Python 3
> gzip module also still makes use of tell() ans seek(). So both
> argument for including this patch are still valid.

Performance is easily improved by wrapping the file object in a
io.BufferedReader or io.BufferedWriter:

Text 1 byte block test
Original gzip Write:    2.125 s Read:    0.683 s
New gzip      Write:    0.390 s Read:    0.240 s

Text 4 byte block test
Original gzip Write:    1.077 s Read:    0.351 s
New gzip      Write:    0.204 s Read:    0.132 s

Text 16 byte block test
Original gzip Write:    1.119 s Read:    0.353 s
New gzip      Write:    0.264 s Read:    0.137 s

Still, fixing the seek()/tell() issue would be nice.

----------
title: [gzip] Performance for small reads and fix seek problem -> Performance 
for small reads and fix seek problem

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1675951>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to