Subject: bug#2963: wishlist: improve speed of `make-overlay'

From: Werner LEMBERG <[email-masked]>
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