emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tick Reduction


From: Stefan Monnier
Subject: Re: Tick Reduction
Date: Fri, 19 Nov 2021 16:09:44 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> IIUC this isn't quite true: the "old" glyph matrix still contains the
>> rendering result of the previous lines and while it's old, it's still
>> up-to-date, so we might be able to extract the alignment info we need
>> from that.
>
> The display code only assumes the current glyph matrix is up-to-date
> if a set of very conservative tests succeeds.  In the other cases, it
> doesn't use the contents of the current glyph matrix.

So far it indeed doesn't use the old glyph matrix, but that matrix is
still around and (for the lines that preceded the currently processed
text) should still be up-to-date.
So we could conceivably use that.

> And if this is not enough, let me remind you that the display engine
> also includes a set of functions that "emulate" redisplay, and those
> cannot use the glyph matrices at all, because they many times are used
> for text that is not displayed at all.

Yes, we may have to declare that for functions that "emulate" the
redisplay internally, the resulting horizontal position info might not
always be quite right (might not reflect what you'll see on the glass)
for text tat uses the new alignment functionality :-(

>> Not necessarily always: we could record dependencies between lines of
>> the glyph matrix such that we only grow the set of redisplayed lines
>> when it's actually needed (i.e. when the corresponding text does use
>> such cross-line alignment).
> Anything can be implemented: this is software, after all.  All I'm
> saying is that it won't be easy, not at all.

No doubt.  I'm just trying to separate "hard" from "fundamentally incompatible".

AFAICT it could be made to work without having to rewrite all the code,
so I consider it as "not fundamentally incompatible".
But I agree it wouldn't be easy.

> And once again, the display code tries very hard not to use the
> current glyph matrix because there's no good way of knowing when it's
> up to date, especially when you are in the middle of some Lisp code.

Indeed, it might imply a rethink of how we manage the
old/current/desired glyph matrices.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]