Message45437
Currently, cStringIO.writelines() only accepts a
sequence argument and it passes that argument
internally to str.join() to construct a large temporary
string before writing.
The patch allows the method to accept any iterable
argument and for the lines to be written one at a time
which cuts memory utilization in half.
The result is especially valuable when used with
generators or itertools because the strings are
constructed on the fly rather than all at once. |
|
Date |
User |
Action |
Args |
2007-08-23 15:32:34 | admin | link | issue907403 messages |
2007-08-23 15:32:34 | admin | create | |
|