all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A question about overlays and performance.
@ 2020-07-25 16:40 Jeff Norden
  2020-07-25 16:53 ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff Norden @ 2020-07-25 16:40 UTC (permalink / raw)
  To: emacs-devel

I've been working on an improved emacs mode for CWEB files.

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.

I've been using text properties, but am realizing that overlays would make
things a bit simpler.  Is there a way to predict how many overlays will be
"too many" and start to slow thing down?  Does the configuration of the
overlays play a role?

A file with 200 sections would wind up with 400 overlays, but the layout would
be simple.  There would be "section" overlays that are disjoint from each
other, and "subsection" overlays each of which is contained in a unique
section.  Each section would contain at most one subsection, so a position
would never be in more than two of the overlays.  It would also be easy to
call (overlay-recenter) each time the cursor moves to a new section.

Thanks in advance!
-Jeff



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-07-30 23:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-25 16:40 A question about overlays and performance Jeff Norden
2020-07-25 16:53 ` Eli Zaretskii
2020-07-25 17:24   ` Jeff Norden
2020-07-25 17:29     ` Eli Zaretskii
2020-07-26  1:33   ` Ihor Radchenko
2020-07-26 13:56     ` Eli Zaretskii
2020-07-26 14:19       ` Ihor Radchenko
2020-07-26 14:44     ` Stefan Monnier
2020-07-27 11:20       ` Ihor Radchenko
2020-07-28 16:43         ` Jeff Norden
2020-07-28 16:58           ` Yuan Fu
2020-07-28 17:05             ` Eric Abrahamsen
2020-07-29  1:52           ` Ihor Radchenko
2020-07-30 18:21             ` Jeff Norden
2020-07-28 23:53         ` Juri Linkov
2020-07-29  1:36           ` Ihor Radchenko
2020-07-30 23:04             ` Juri Linkov

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.