From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 57727@debbugs.gnu.org
Subject: bug#57727: 29.0.50; Optimize tty display updates
Date: Sun, 11 Sep 2022 09:49:11 -0400 [thread overview]
Message-ID: <jwvfsgydo5y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2wnaans72.fsf@Mini.fritz.box> ("Gerd Möllmann"'s message of "Sun, 11 Sep 2022 12:03:45 +0200")
> +DEFUN ("tty--set-output-buffer-size", Ftty__set_output_buffer_size,
> + Stty__set_output_buffer_size, 1, 2, 0, doc:
> + /* Set the output buffer size for a TTY.
> +
> +SIZE zero means use the system's default value. If SIZE is
> +non-zero,this also avoids flushing the output stream.
^^
SPC
> +TTY may be a terminal object, a frame, or nil (meaning the selected
> +frame's terminal).
> +
> +This function temporarily suspends and resumes the terminal
> +device. */)
> + (Lisp_Object size, Lisp_Object tty)
> +{
> + if (!TYPE_RANGED_FIXNUMP (size_t, size))
> + error ("Invalid output buffer size");
> + Fsuspend_tty(tty);
^^
SPC
> + struct terminal *terminal = decode_tty_terminal (tty);
> + terminal->display_info.tty->output_buffer_size
> + = XFIXNUM (size) <= 0 ? 0 : XFIXNUM (size);
> + return Fresume_tty(tty);
^^
SPC
That seems a bit over-engineered to me.
Why not just a DEVAR_BOOL to control whether we flush or not?
If someone wants to try out different buffer sizes, I suspect that
recompiling is a good enough solution (or provide a DEFVAR_INT for that
and let the tester(s) call `suspend/resume-tty` by hand).
Stefan
next prev parent reply other threads:[~2022-09-11 13:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-11 10:03 bug#57727: 29.0.50; Optimize tty display updates Gerd Möllmann
2022-09-11 11:18 ` Lars Ingebrigtsen
2022-09-12 6:02 ` Gerd Möllmann
2022-09-12 11:21 ` Eli Zaretskii
2022-09-11 13:49 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-09-12 6:33 ` Gerd Möllmann
2022-09-12 11:29 ` Eli Zaretskii
2022-09-12 11:52 ` Gerd Möllmann
2022-09-12 13:15 ` Gerd Möllmann
2022-09-12 14:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-13 5:53 ` Gerd Möllmann
2022-09-13 11:33 ` Eli Zaretskii
2022-09-13 11:36 ` Lars Ingebrigtsen
2022-09-13 12:44 ` Gerd Möllmann
2022-09-13 13:48 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-13 13:53 ` Gerd Möllmann
2022-09-17 13:34 ` Gerd Möllmann
2022-09-17 21:09 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-18 5:34 ` Gerd Möllmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvfsgydo5y.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=57727@debbugs.gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.