emacs-devel
[Top][All Lists]
Advanced

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

Re: A question about overlays and performance.


From: Ihor Radchenko
Subject: Re: A question about overlays and performance.
Date: Sun, 26 Jul 2020 09:33:21 +0800

> The elisp manual says this about overlays:

>  However,... overlays generally don’t scale well...
>  If you need to affect the visual appearance of many portions
>  in the buffer, we recommend using text properties.

Not directly related to the initial question here, but may I ask if
there are any practical guidelines to convert overlays to text
properties? I am specifically concerned about two issues when we want to
use text properties instead of overlays to hide text in buffer (pointing
at org-mode):
- text hidden via text properties is not well-handled by isearch. For
  overlays, isearch can temporary reveal the hidden text, which is not
  the case for text hidden using 'invisible text property.
- text properties are not buffer-local in indirect buffers. With
  overlays, it is possible to have define hidden text in basic and
  indirect buffer independently. However, text properties will always be
  shared and the text hidden in indirect buffer will automatically be
  hidden in the base buffer as well.

Best,
Ihor

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Jeff Norden <jnorden@math.tntech.edu>
>> Date: Sat, 25 Jul 2020 11:40:26 -0500
>> 
>> Is there a way to predict how many overlays will be "too many" and
>> start to slow thing down?
>
> Thousands.
>
>> Does the configuration of the overlays play a role?
>
> What do you mean by "configuration" in this context?
>

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg



reply via email to

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