unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: emacs-devel@gnu.org
Subject: Re: Process:  Determining the origin of a command loop.
Date: Thu, 20 Dec 2018 16:11:20 +0200	[thread overview]
Message-ID: <838t0kcmpj.fsf@gnu.org> (raw)
In-Reply-To: <m2r2ec96r6.wl%esq@lawlist.com> (message from Keith David Bershatsky on Wed, 19 Dec 2018 20:11:57 -0800)

> Date:  Wed, 19 Dec 2018 20:11:57 -0800
> From:  Keith David Bershatsky <esq@lawlist.com>
> Cc:  emacs-devel@gnu.org
> 
> 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 t
 he 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	other threads:[~2018-12-20 14:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20  4:11 Process: Determining the origin of a command loop Keith David Bershatsky
2018-12-20 14:11 ` Eli Zaretskii [this message]
2018-12-20 15:39   ` Cursor drawing (was: Process: Determining the origin of a command loop) Stefan Monnier
2018-12-20 19:07     ` Cursor drawing Eli Zaretskii
2018-12-20 19:18       ` Stefan Monnier
2018-12-20 19:35         ` Eli Zaretskii
2018-12-20 19:58           ` Stefan Monnier
2018-12-21  4:03             ` Elias Mårtenson
2018-12-21  7:09               ` Eli Zaretskii
2018-12-21 16:36                 ` Elias Mårtenson
2018-12-21 20:05                   ` Eli Zaretskii
2018-12-21 20:27                     ` Clément Pit-Claudel
2018-12-21 20:37                       ` Eli Zaretskii
2018-12-21 20:41                         ` Eli Zaretskii
2018-12-22 16:43                         ` Stefan Monnier
2018-12-22 17:03                           ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2018-12-20 23:54 Process: Determining the origin of a command loop Keith David Bershatsky
2018-12-19  4:34 Keith David Bershatsky
2018-12-19 15:24 ` Eli Zaretskii

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=838t0kcmpj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esq@lawlist.com \
    /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).