GNU bug report logs - #2963
wishlist: improve speed of `make-overlay'

Previous Next

Package: emacs;

Reported by: Werner LEMBERG <wl <at> gnu.org>

Date: Sat, 11 Apr 2009 14:10:04 UTC

Severity: minor

Merged with 26051

Found in version 25.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Werner LEMBERG <wl <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#2963: wishlist: improve speed of `make-overlay'
Date: Sat, 11 Apr 2009 16:02:50 +0200 (CEST)
The complexity of `make-overlay' appears to be O(N), which makes it
unbearably slow for larger buffers.  In my test case, it started with
about 1000 calls per second, and after about 10000 calls it already
reduced to approx. 100 calls per second.

On the other hand, handling text properties is O(log N), which works
fine even for my 400000 line document.

Stefan says:

  But note that it's not just `make-overlay': every time we make a
  modification to the buffer, we have to update the position of all
  the overlays (and markers) after point.  So, yes, a better
  data-structure for overlays (and markers) would be very welcome.



      Werner





This bug report was last modified 1 year and 211 days ago.

Previous Next


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