Message48667
Currently, the splitlines result is discarded, and only
the first line is used. Then, when another line is
requested, the rest string is split again.
With this patch, the splitlines result is preserved if
it has more than two lines, and subsequent .readline
calls get their results from self.linebuffer.
Data is either in self.linebuffer or self.charbuffer;
read() converts the linebuffer back to a charbuffer in
case somebody mixes .read and .readline calls.
On a file with 104 lines (103 of them being "pass") and
542 bytes, the number of _IsLinebreak calls went down
from 6770 to 550 |
|
| Date |
User |
Action |
Args |
| 2007-08-23 15:43:45 | admin | link | issue1268314 messages |
| 2007-08-23 15:43:45 | admin | create | |
|