Reducing cache/buffer for faster display

Rikishi42 skunkworks at rikishi42.net
Fri Sep 28 20:20:50 EDT 2012


On 2012-09-28, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Thu, 27 Sep 2012 22:25:39 +0000 (UTC), John Gordon <gordon at panix.com>
> declaimed the following in gmane.comp.python.general:
>
>> 
>> Isn't terminal output line-buffered?  I don't understand why there would
>> be an output delay.  (Unless the "\r" is messing things up...)
>
> 	It's the trailing ,		The \r is being used to reset to the
> beginning of the console line, but the comma "says" more output for
> /this/ line will be coming... So no output until explicitly flushed, or
> a new-line is issued.

Well, the \r seems to be the problem, allright.
But output was not completely blocked, just delayed a very long time.  

So perhaps flushing and a sending a newline aren't the only triggers for
output.  Perhaps there's a maximum delay or a maximum cumulated size, and
the output is flushed when such a limit is reached.

Anyway, that's mainly academic. I doubt there will be a correction to
that behaviour. 

-- 
When in doubt, use brute force.
                -- Ken Thompson



More information about the Python-list mailing list