[issue11114] TextIOWrapper.tell extremely slow

Laurens report at bugs.python.org
Fri Feb 4 17:54:36 CET 2011


Laurens <3.14159265358 at xs4all.nl> added the comment:

First of all, thanks to all for your cooperation, it is very much appreciated.

I made some minor changes to the benchmark program. Conclusions are:

 * setting file._CHUNK_SIZE to 20 has a dramatic effect, changing execution time in 3.2rc2 from 8.4s to 0.06s, so more than a factor 100 improvement. It's a bit clumsy, but acceptable as a performance work around.

 * opening file binary has a dramatic effect as well, I would say. After 2 minutes I stopped execution of the program, concluding that this change made the program at least a factor 10 *slower* instead of faster. So I cannot confirm DSM's statement that the performance hit would be a factor 2. Instead, I see a performance hit of at least a factor 100000 (10e5) compared tot 2.7.1, which is presumably not by construction ;-).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11114>
_______________________________________


More information about the Python-bugs-list mailing list