Richard Oudkerk added the comment:

In each loop before calling read() the buffer size is recalculated based on the 
amount of space used, causing a realloc *regardless* of how much empty space is 
left in the buffer.  And each read is only producing a smallish chunk (5120 
bytes).
So assuming realloc fails to do an inplace realloc (and Windows is reputedly 
very bad at that) the amount of data copied will be O(n^2).

----------

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

Reply via email to