Python 3 read() function
tjreedy at udel.edu
Fri Dec 5 03:00:29 CET 2008
Christian Heimes wrote:
> Terry Reedy wrote:
>> Timing of os interaction may depend on os. I verified above on WinXp
>> with 4 meg Pythonxy.chm file. Eye blink versus 3 secs, duplicated. I
>> think something is wrong that needs fixing in 3.0.1.
> I've attached a patch to the bug. reading was so slow because the
> fileio_readall() was increasing the buffer by 8kB in each iteration. The
> new code doubles the buffer until it reaches 512kB. Starting with 512kB
> it's increased in 512kB blocks. Python 2.x has the same growth rate.
Thank you. Too bad this was not caught a week ago, but the timing of
each method of each class is a bit hard to test for. Perhaps in the future.
More information about the Python-list