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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 11 Sep 2022 13:18:34 +0200

Gerd Möllmann <[email-masked]> writes:

> The patch below is my first take on that.  It adds a low-level interface
> consisting of two functions tty--set-output-buffer-size and
> tty-output-buffer-size to change and retrieve the output buffer size of
> a device.  A buffer size of 0 is taken to mean "do what we did since
> 1991, and a non-zero value is used as the buffer size set with setvbuf.

Makes sense to me.

> Default is currently to do everything as it always was.  One has to do
> something like
>
>   (tty--set-output-buffer-size (* 64 1024))
>
> to change to the new behavior.
>
> Feedback welcome, especially for the default, i.e. leaving everything
> as-is, and for the Lisp interface.

Perhaps adding a defcustom for this where the :set calls
`tty--set-output-buffer-size' might be a nice interface?