From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Ihor Radchenko <yantar92@posteo.net>,
Eli Zaretskii <eliz@gnu.org>,
mattias.engdegard@gmail.com, emacs-devel@gnu.org
Subject: Re: Removing redisplay-dont-pause
Date: Tue, 03 Dec 2024 05:55:27 +0100 [thread overview]
Message-ID: <m27c8h2wn4.fsf@gmail.com> (raw)
In-Reply-To: <jwv1pypveq0.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 02 Dec 2024 18:50:20 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Assume the incoming events come every T seconds and take T1 seconds to
>>> run, and the subsequent redisplay takes time T2+T3 (where T2 is the time
>>> in the middle where `redisplay-dont-pause` is consulted).
>>
>> I think you meant to say that T3 is the phase at the end where
>> redisplay-dont-pause is checked, the update phase that writes to the
>> screen. T2 would then be the phase where the glyphs are produced.
>
> My "analysis" doesn't care what's done when betwen T2 and T3, but yes,
> T2 is the part that's affected by long lines, jit-lock, invisible text,
> whereas T3 is about actual "drawing", so it can be affected by your 1200
> bauds serial line (if you're sufficiently unlucky to be stuck behind
> such a thing).
Yes, I think we have the same model. I've always divided redisplay into
two phases, in my head: (1) glyph generation and (2) update, where
update starts basically when update_frame is called.
> My impression is that, historically, T3 has been on a mostly decreasing
> slope over time, whereas T2 has been on a rather increasing slope.
> So back in Emacs-18, I suspect that T2 was usually dwarfed by T3,
> whereas nowadays it's rather the reverse.
Yes, 100%. T3 started to matter less and less during the 90s, and I'd
say it isn't a problem at all nowadays. (I don't even know where slow
serial connections have to be used today, or why. And USB 2 has already
something like 420 Mbits/s, IIRC.)
>>> - If T < T1, then we plain and simply can't keep up at all, the
>>> redisplay is just not run at all and incoming events keep accumulating
>>> as we fall ever further behind the incoming events until the incoming
>>> events stop (at which point Emacs will only refresh its redisplay
>>> after it has finally caught up with the buffered input).
>> The direct_output_for_insert optimization was though for that, ensuring
>> that at least the line one types in is made visible on the screen.
>
> That's my understanding as well.
> But the change in hardware performance has made it so that in the
> `direct_output_for_insert` case nowadays T is almost never > T1+T2+T3,
> which is why we could remove that optimization.
Yes I think that change was the Right Thing, because it reduces
complexity.
(BTW, there is a third part of the slow terminal story that I haven't
seen mentioned yet, and which I think might be a candidate for removal:
"scrolling". If that were no longer done, all the hocus pocus around
frame-based redisplay could go. Just saying; it would be larger change.)
next prev parent reply other threads:[~2024-12-03 4:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 5:43 Removing redisplay-dont-pause Gerd Möllmann
2024-11-17 7:11 ` Eli Zaretskii
2024-11-30 9:58 ` Eli Zaretskii
2024-11-30 18:56 ` Stefan Monnier
2024-12-01 9:46 ` Mattias Engdegård
2024-12-01 10:08 ` Eli Zaretskii
2024-12-01 10:43 ` Ihor Radchenko
2024-12-01 14:40 ` Eli Zaretskii
2024-12-01 14:49 ` Ihor Radchenko
2024-12-01 15:20 ` Eli Zaretskii
2024-12-02 2:38 ` Stefan Monnier
2024-12-02 4:18 ` Gerd Möllmann
2024-12-02 23:50 ` Stefan Monnier
2024-12-03 4:55 ` Gerd Möllmann [this message]
2024-12-01 15:28 ` Gerd Möllmann
2024-12-01 15:57 ` Eli Zaretskii
2024-12-09 2:19 ` Stefan Kangas
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=m27c8h2wn4.fsf@gmail.com \
--to=gerd.moellmann@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mattias.engdegard@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=yantar92@posteo.net \
/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).