all messages for Emacs-related lists mirrored at yhetil.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: Efficiently using MOVE_IT_... to gather a plethora of information.
Date: Wed, 23 Aug 2017 21:08:28 +0300	[thread overview]
Message-ID: <83ziaq88df.fsf@gnu.org> (raw)
In-Reply-To: <m2r2w373x9.wl%esq@lawlist.com> (message from Keith David Bershatsky on Tue, 22 Aug 2017 13:17:38 -0700)

> Date:  Tue, 22 Aug 2017 13:17:38 -0700
> From:  Keith David Bershatsky <esq@lawlist.com>
> Cc:  emacs-devel@gnu.org
> 
> I have been gathering data for each screen line at all three (3) locations and storing that data in a list -- I'll call this "the whopper/everything".  Once all of the data is gathered, I iterate over each element of the list and see whether certain criteria is met -- e.g., this element is for the beginning of a line, so put line numbers; this element is for the end of a line, so put pilcrows and maybe part of a floating vertical line (tracking the cursor position); this element is aligned with the real cursor and we are in the middle of a line of text, so draw a portion of thin vertical line through the text (tracking the cursor position).

IMO, this design is sub-optimal, and will necessarily cause slowdown,
sometimes a very serious one.  What you should do instead is generate
your numbers, pilcrows, and thin lines as part of the basic layout
code in display_line.  That is, do that on the fly, whenever
display_line gets to the point where you need to produce something
special.  Doing that as an after-thought, in a separate cycle that
follows redisplay is bound to be slow.  The native line numbers are
much faster than linum.el and similar packages precisely because it
produces line numbers on the fly, whenever the lines are laid out.



  parent reply	other threads:[~2017-08-23 18:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 20:17 Efficiently using MOVE_IT_... to gather a plethora of information Keith David Bershatsky
2017-08-23  3:58 ` Stefan Monnier
2017-08-23  8:46   ` martin rudalics
2017-08-23  8:49     ` martin rudalics
2017-08-23 20:56     ` Stefan Monnier
2017-08-23 17:21   ` Eli Zaretskii
2017-08-23 18:08 ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-22 18:26 Keith David Bershatsky
2017-08-22 19:16 ` 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

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

  git send-email \
    --in-reply-to=83ziaq88df.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.