# HG changeset patch # User Eli Zaretskii # Date 1239440048 0 # Node ID 12eccf796fc2f4517aa60585d11c51dc7ff5c2e4 # Parent 43afcb8b92d4cfab3cb338d4e3c826f530e3687c (Overlays): Overlays don't scale well. See http://lists.gnu.org/archive/html/emacs-devel/2009-04/msg00243.html. diff -r 43afcb8b92d4 -r 12eccf796fc2 doc/lispref/display.texi --- a/doc/lispref/display.texi Fri Apr 10 15:46:37 2009 +0000 +++ b/doc/lispref/display.texi Sat Apr 11 08:54:08 2009 +0000 @@ -1148,6 +1148,14 @@ beginning and end. It also has properties that you can examine and set; these affect the display of the text within the overlay. +@cindex scalability of overlays +The visual effect of an overlay is the same as of the corresponding +text property (@pxref{Text Properties}). However, due to a different +implementation, overlays generally don't scale well (many operations +take a time that is proportional to the number of overlays in the +buffer). If you need to affect the visual appearance of many portions +in the buffer, we recommend to use text properties. + An overlay uses markers to record its beginning and end; thus, editing the text of the buffer adjusts the beginning and end of each overlay so that it stays with the text. When you create the overlay,