Subject: bug#57727: 29.0.50; Optimize tty display updates

From: Eli Zaretskii <[email-masked]>
Date: Mon, 12 Sep 2022 14:29:13 +0300

> Cc: [email-masked]
> From: Gerd Möllmann <[email-masked]>
> Date: Mon, 12 Sep 2022 08:33:12 +0200
> 
> Stefan Monnier <[email-masked]> writes:
> 
> > That seems a bit over-engineered to me.
> > Why not just a DEVAR_BOOL to control whether we flush or not?
> 
> Ok.  My thoughts went like so:

FWIW, I don't think this is over-engineered.  The suspend/resume dance
caused me to raise a brow, but I guess you cannot otherwise reset the
terminal settings?

> 2. I don't believe that just avoiding fflush will be enough.  THe code
> currently uses a buffer of size BUFSIZ, which is OS-specific.  On my
> system, for instance, BUFSIZ = 1024.  Don't know about MS-Windows today,
> but I remember it being 512 there at some time.

It's still 512.  But buffered stdio functions in the MS-Windows
runtime use 4K buffers, AFAIK, not 512B buffers.