From: Werner LEMBERG <wl@gnu.org>
To: bug-gnu-emacs@gnu.org
Subject: bug#2963: wishlist: improve speed of `make-overlay'
Date: Sat, 11 Apr 2009 16:02:50 +0200 (CEST) [thread overview]
Message-ID: <20090411.160250.235838581.wl@gnu.org> (raw)
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
next reply other threads:[~2009-04-11 14:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 14:02 Werner LEMBERG [this message]
2021-07-18 21:04 ` bug#2963: wishlist: improve speed of `make-overlay' Lars Ingebrigtsen
2023-10-21 11:33 ` Mauro Aranda
2023-10-21 11:43 ` Eli Zaretskii
2023-10-21 11:52 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090411.160250.235838581.wl@gnu.org \
--to=wl@gnu.org \
--cc=2963@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).