[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Nadeem Vawda
Nadeem Vawda added the comment: No problem :) -- assignee: -> nadeem.vawda resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1c434e30e06 by Nadeem Vawda in branch '2.7': Issue #13159: Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one. http://hg.python.org/cpython/rev/c1c434e30e06 -- ___ Python tr

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d18c80a8c119 by Nadeem Vawda in branch '3.2': Issue #13159: Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one. http://hg.python.org/cpython/rev/d18c80a8c119 New changeset 4a6709a071d0 by Nadeem Vawda in branch 'default

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks good to me, thanks. -- versions: +Python 2.7, Python 3.2 ___ Python tracker ___ ___

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-12 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-12 Thread Nadeem Vawda
Nadeem Vawda added the comment: I've attached a patch that makes the suggested change to FileIO, and also to _bz2.BZ2Compressor/Decompressor (which currently have the same issue). -- keywords: +patch Added file: http://bugs.python.org/file23389/buffer-growth.diff __

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-12 Thread Nadeem Vawda
New submission from Nadeem Vawda : As mentioned in issue 6715, the buffer growth strategy used by _io.FileIO has quadratic running time if each reallocation is O(n). The code in question is new_buffersize() from Modules/_io/fileio.c: if (currentsize > SMALLCHUNK) { /* Keep doubling u