unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: redisplay-dont-pause
Date: Fri, 16 Sep 2011 10:23:51 +0300	[thread overview]
Message-ID: <83obyluf08.fsf@gnu.org> (raw)
In-Reply-To: <E1R4K1E-0008MN-T9@fencepost.gnu.org>

> Date: Thu, 15 Sep 2011 18:02:52 -0400
> From: Richard Stallman <rms@gnu.org>
> CC: emacs-devel@gnu.org
> 
>     When the value is nil, Emacs checks at several places during redisplay
>     whether some input is available, and if so, it aborts the redisplay
>     cycle to handle the incoming input.  That has the effect of forcing a
>     full redisplay on the next opportunity, for those frames that were not
>     completely redisplayed.  Here, "full" means that all display
>     optimizations are wholesale disabled for all windows on the frame.
> 
> That is strange.  I wonder why it does that?

Because the optimizations rely on the display being up to date, which
cannot be assured if redisplay was aborted half way through.  The
current display engine is very conservative about that, and any of the
indications that the display might not be entirely accurate disable
most if not all of the optimizations.

> In the old days, Emacs would update the display records for each line
> that it output, so that the subsequent redisplay would know where it
> was starting from.

There are no such fine-grained display records in the current display
engine, AFAIK.  Perhaps that's something that was planned, but never
implemented.  Or maybe implementing it is very hard with the current
display features, I really cannot say.

> Over any substantial period, if the commands come so fast that excuting
> them leaves no time for redisplay, Emacs should not redisplay at all.
> You might describe that by saying "the display gets stuck", but this
> is what should happen.

Right.  But the net effect on the user experience is negative.

>      . it effectively slows down the keyboard auto-repeat rate (because
>        events need to wait for the end of redisplay before they are
>        processed), but only by a small factor, so the user experience is
>        that Emacs does succeed to keep up.
> 
> I am lost here.  The keyboard determines its auto-repeat rate.
> Emacs can't slow it down.  All it can do is skip redisplays so
> as to cope with the commands at the rate they are generated.

That's why I said "effectively".  The keyboard of course works at its
nominal speed, but Emacs lets input events wait in its queue for some
short time, thus the rate of event processing is slightly lower than
what the keyboard produces.  It's hard to time such fast sequences
with the existing facilities, but I'm quite sure that letting
redisplay optimizations do their best is on balance a win, and only
some input events need to wait in the queue before they are processed.
IOW, setting this variable non-nil actually helps Emacs to keep up
with high-rate input, because the cost of a full redisplay is so much
higher.



  reply	other threads:[~2011-09-16  7:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 15:36 redisplay-dont-pause Eli Zaretskii
2011-09-14 15:38 ` redisplay-dont-pause Juanma Barranquero
2011-09-14 16:12 ` redisplay-dont-pause Leo
2011-09-14 17:09   ` redisplay-dont-pause Eli Zaretskii
2011-09-15  4:12     ` redisplay-dont-pause Richard Stallman
2011-09-15  5:24       ` redisplay-dont-pause Eli Zaretskii
2011-09-15  2:10 ` redisplay-dont-pause Christoph Scholtes
2011-09-15  3:03   ` redisplay-dont-pause Eli Zaretskii
2011-09-15  4:12 ` redisplay-dont-pause Richard Stallman
2011-09-15  4:59   ` redisplay-dont-pause Eli Zaretskii
2011-09-15 22:02     ` redisplay-dont-pause Richard Stallman
2011-09-16  7:23       ` Eli Zaretskii [this message]
2011-09-16 17:29         ` redisplay-dont-pause Richard Stallman
2011-09-16 17:45           ` redisplay-dont-pause Eli Zaretskii
2011-09-17  0:36             ` redisplay-dont-pause Richard Stallman
2011-09-17  8:13               ` redisplay-dont-pause Eli Zaretskii
2011-09-17 19:43                 ` redisplay-dont-pause Chong Yidong
2011-09-24 14:39                   ` redisplay-dont-pause Eli Zaretskii
2011-09-17 21:30                 ` redisplay-dont-pause Stefan Monnier
2011-09-18 11:07                   ` redisplay-dont-pause Juanma Barranquero

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83obyluf08.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).