[Top][All Lists]

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

Re: Process: Determining the origin of a command loop.

From: Eli Zaretskii
Subject: Re: Process: Determining the origin of a command loop.
Date: Thu, 20 Dec 2018 16:11:20 +0200

> Date:  Wed, 19 Dec 2018 20:11:57 -0800
> From:  Keith David Bershatsky <address@hidden>
> Cc:  address@hidden
> Whereas an individual cursor (the real cursor) has very little overhead, an 
> average of approximately 200 fake cursors are indeed semi-costly and merit 
> optimization.  The current draft of 
> crosshairs/visible-fill-column/multiple-fake-cursors relies upon 
> display_and_set_cursor to determine when to generate the goodies.  I would 
> like to optimize/suppress the goodies so that they are erased/redrawn only 
> when absolutely necessary.  Let us assume that we make the following 
> modifications to the Emacs master branch and evaluate the following Lisp code 
> after launching the newly built Emacs from the terminal so that we can see 
> the STDERR trace-redisplay output.  As to the current buffer in this 
> situation, there is no need to erase and redraw the goodies (200 fake 
> cursors) because the cursor is in the same location and the buffer is 
> unmodified in all respects.  The only changes are occurring in the 
> *compilation* buffer, which is not the current buffer.  The hallmarks of this 
> situation are "redisplay_preserve_echo_area (12)".

I understand, but I think you will have to come up with your own
mechanism to check when the
crosshairs/visible-fill-column/multiple-fake-cursors need to be
updated, because I don't think that can be established from the
physical cursor's position or the need to redraw it.  Since those fake
cursors can be anywhere in the window, and the conditions for updating
them are independent of the conditions for moving point, the logic for
that must be independently designed and implemented, using the data
you maintain for drawing those fake cursors.  If you already track
that data, then all you need is determine whether any of it changed
since the last time.

reply via email to

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