Richard Oudkerk added the comment:

Here is the patch (with the old ones removed).

Note that the old code mishandled the case where _PyBytes_Resize() failed by 
assuming that the old bytes object would still be valid.

I have assumed that stream psuedo-files will never claim to have a size greater 
than zero.  The code will still work if this assumption is false.

----------
title: 500x speed up for Popen.communicate() on Windows -> FileIO.readall() has 
worst case O(n^2) complexity
Added file: http://bugs.python.org/file26970/readall-combined.patch

_______________________________________
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