emacs-devel
[Top][All Lists]
Advanced

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

Re: Overlay mechanic improvements


From: David Kastrup
Subject: Re: Overlay mechanic improvements
Date: Sun, 21 Sep 2014 15:52:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>     preview-latex <URL:http://www.gnu.org/software/auctex/preview-latex>
>     extensively uses overlays (and they can easily grow to a few thousand
>     per document in a mathematically oriented paper),
>
> How many overlays would appear on one screen?

Probably rarely more than a few dozen (that would mostly be the case
when using lots of inline math for small expressions like $a_i$).

>     Quadratic behavior for the markers used as start- and end markers is
>     clearly undesirable.
>
> The existing code should be fat if you recenter the overlays
> frequently at point, unless you have lots of overlays on one screen.
> Do you recenter them?

Not that I know of.

> If so, why is it slow?
>
> Why aren't text properties right for this?

Because you don't want _anything_ that text properties do.  You don't
want to have the stuff cut&paste, you don't want to have the buffer
modified because images are switched on and off, you most definitely
don't want ever to split its identity in two if there are insertions in
the middle, you don't want anything inserted anywhere inheriting
anything from it.

"We did not bother making overlays work efficiently" is not the right
criterion for choosing between overlays and text properties.

-- 
David Kastrup



reply via email to

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