GNU bug report logs - #58342
29.0.50; noverlay branch is O(N) for important calls

Previous Next

Package: emacs;

Reported by: Matt Armstrong <matt <at> rfc20.org>

Date: Thu, 6 Oct 2022 23:27:01 UTC

Severity: normal

Merged with 58361

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Drew Adams <drew.adams <at> oracle.com>, Matt Armstrong <matt <at> rfc20.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "gerd.moellmann <at> gmail.com" <gerd.moellmann <at> gmail.com>, "eliz <at> gnu.org" <eliz <at> gnu.org>, "mail <at> andreas-politz.de" <mail <at> andreas-politz.de>, "58342 <at> debbugs.gnu.org" <58342 <at> debbugs.gnu.org>
Subject: bug#58342: 29.0.50; noverlay branch is O(N) for important calls
Date: Sat, 8 Oct 2022 00:27:40 +0000
> > Does anybody know of an Emacs package that uses a large number of
> > overlays that span large amounts of the buffer in complex ways?
> 
> Sure.  zones.el does (especially the version
> I use, which I haven't yet exposed externally).
> 
> The point of zones.el is to manipulate arbitrary
> sets of buffer zones, which can be implemented
> as overlays (as one possibility).
> 
> They can overlap in any way, as the library is
> a utility that you can use in any way.  And you
> can sort zones, unite/coalesce them, etc.  It's
> not at all unusual to deal with many overlapping
> zones, e.g., overlays.
> 
> Dunno what the "noverlay" branch is.  I haven't
> seen any description of it or its purpose,
> despite the many, many emails here and in
> emacs-devel with "noverlay" in the Subject line.
> As a result, those many messages get only an
> uninformed glance from me.
> 
> But if the "noverlay" branch is supposed to deal
> with overlays _in general_ in some way, then I'd
> think that the case of many overlapping overlays
> wouldn't necessarily be rare.  Why would it be?
> 
> You can use an overlay for anything: store any
> information on for buffer zone.  An overlay is
> just two buffer positions plus a set of
> properties - any properties.  _Super_ general.

As an example just one use of arbitrarily
positioned overlays, you can save narrowings
to a set of zones (which can be overlays), and
later reactivate any of them on demand.

Narrowings can have any limits, of course.  The
overlays in a zones set can overlap in arbitrary
ways, like Venn diagrams.





This bug report was last modified 2 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.