all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel@gnu.org
Subject: Re: highlight-indent-guides in display engine
Date: Sun, 07 Jul 2019 18:04:10 +0300	[thread overview]
Message-ID: <83sgrh7uol.fsf@gnu.org> (raw)
In-Reply-To: <20190706211716.semd47fksgh66rug@Ergus> (message from Ergus on Sat, 6 Jul 2019 23:17:16 +0200)

> Date: Sat, 6 Jul 2019 23:17:16 +0200
> From: Ergus <spacibba@aol.com>
> 
> This email is a question about the highlight-indent-guides because some
> people find that functionality very useful (and it is very common in
> ides/editors around).
> 
> I am using the package with that name [1] but It affects performance a
> lot. Specially scrolling and responsiveness in general. Even when
> disabling the animations. 
> 
> So my question is in two parts:
> 
> 1) Does emacs already provides a way to reproduce this functionality
> that does not kill performance so much, even if we sacrifice some
> functionality?

Not that I know of.  But there are some alternatives mentioned in the
README of that package -- aren't some of them faster?

> 2) Does it make sense to implement it in the display engine as we did
> with the fill-column-indicator?

Hard to answer this question because the requirements aren't clear.
The description of highlight-indent-guides doesn't include any
systematic explanations of what the package does, only some quite
terse description of some options.  Do you want to have all of what
that package does, or only part (and if the latter, which part)?

In general, I see potential difficulties in making this entirely part
of the display code, because what is displayed in the indentation of
each line depends directly and indirectly on what happens in preceding
lines.  This means, for example, that when the display engine is
invoked to lay out a single line, it might need to look backwards,
potentially very far backwards, to find indentation on previous lines,
If I'm not missing something, and this is indeed so, then such
searches will almost certainly slow down redisplay considerably.

Maybe someone will have clever ideas for how to avoid this problem.

Alternatively, we could implement part of the feature in Lisp, and the
other part in C.  For example, determining what indentation levels
should be displayed on a given line could be a job of the Lisp part.
But before we decide that this is a viable alternative, we should
profile the current Lisp implementation and find out which of its
parts are responsible for slowdown.  Then we could decide whether this
or that reimplementation will make the feature significantly faster.



  reply	other threads:[~2019-07-07 15:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-06 21:17 highlight-indent-guides in display engine Ergus
2019-07-07 15:04 ` Eli Zaretskii [this message]
2019-07-11 19:06   ` Ergus
2019-07-11 19:15     ` Eli Zaretskii
2019-07-12  0:21       ` Ergus
2019-07-12  6:57         ` Eli Zaretskii
2019-07-12  9:58           ` Ergus
2019-07-12 10:36             ` Ergus
2019-07-12 13:45             ` Eli Zaretskii
2019-07-12 18:51               ` Ergus
2019-07-12 19:35                 ` Drew Adams
2019-07-13  6:59                 ` Eli Zaretskii
2019-07-13  8:32                   ` Joost Kremers
2019-07-13  8:38                     ` Eli Zaretskii
2019-07-13 21:37                       ` Joost Kremers
2019-07-14  5:37                         ` Eli Zaretskii
2019-07-15  5:44                           ` Joost Kremers
2019-07-14 12:56                         ` Ergus
2019-07-15 12:58                           ` Stefan Monnier
2019-07-15 14:11                             ` Ergus
2019-07-15 14:49                               ` Stefan Monnier
2019-07-15 17:10                                 ` Ergus
2019-07-15 18:43                                   ` Stefan Monnier
2019-07-16  8:06                                     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2019-07-07 17:50 Keith David Bershatsky

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=83sgrh7uol.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.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.