Charles-Francois Natali <[email protected]> added the comment:
In the test script, simply changing
def emit(f, data=snips):
for datum in data:
f.write(datum)
to
def gemit(f, data=snips):
datas = ''.join(data)
f.write(datas)
improves direct gzip performance from
[1.1799781322479248, 0.50524115562438965, 0.2713780403137207]
[1.183434009552002, 0.50997591018676758, 0.26801109313964844]
[1.173914909362793, 0.51325297355651855, 0.26233196258544922]
to
[0.43065404891967773, 0.50007486343383789, 0.26698708534240723]
[0.43662095069885254, 0.49983596801757812, 0.2686460018157959]
[0.43778109550476074, 0.50057196617126465, 0.2687230110168457]
which means that you're better off letting the application handle buffering
issues. Furthermore, the problem with gzip-level buffering is the choice of the
default buffer size.
Time to close ?
----------
nosy: +neologix
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue1501108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com