[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `make-overlay' very slow
From: |
Stefan Monnier |
Subject: |
Re: `make-overlay' very slow |
Date: |
Sat, 11 Apr 2009 08:51:09 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
> I did that (see attachment for reference), and it really works at a
> reasonable speed.
Good.
> However, it is the completely wrong concept since
> it sets the `modified' flag and stores undo information,
Yes, you need to wrap the call to > add-text-properties (actually the
whole loop, preferably) in something like
(let ((buffer-file-name nil) ;; To prevent locking/unlocking the file.
(buffer-undo-list t)
(modified (buffer-modified-p)))
(unwind-protect
(...)
(restore-modified-p modified)))
We definitely need to add a macro for it.
> and it fails with modes which use the `invisible' and
> `intangible' properties.
Since these properties are not used very often, it's probably bearable,
but yes, there is a risk of interference.
> So here's my item to the Emacs wishlist: Improve speed of
> (make-overlay) and related functions to be as fast as setting
> text properties.
Yes, that would be great. 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.
Stefan
- Re: hiding lines, (continued)
- Re: hiding lines, Andreas Schwab, 2009/04/10
- Re: hiding lines, Werner LEMBERG, 2009/04/10
- `make-overlay' very slow (was: hiding lines), Werner LEMBERG, 2009/04/10
- Re: `make-overlay' very slow, Stefan Monnier, 2009/04/10
- Re: `make-overlay' very slow, Werner LEMBERG, 2009/04/11
- Re: `make-overlay' very slow, Lennart Borgman, 2009/04/11
- Re: `make-overlay' very slow, Werner LEMBERG, 2009/04/11
- Re: `make-overlay' very slow, Lennart Borgman, 2009/04/11
- Re: `make-overlay' very slow, Werner LEMBERG, 2009/04/11
- Re: `make-overlay' very slow, Eli Zaretskii, 2009/04/11
- Re: `make-overlay' very slow,
Stefan Monnier <=
- Re: `make-overlay' very slow, Kenichi Handa, 2009/04/14
- Re: `make-overlay' very slow, Stefan Monnier, 2009/04/14
- Re: `make-overlay' very slow, Richard M Stallman, 2009/04/14
- Re: `make-overlay' very slow, Kenichi Handa, 2009/04/14
- clone-indirect-buffer-hook should be make-indirect-buffer-hook, klaus.berndl, 2009/04/16
Re: hiding lines, Andreas Roehler, 2009/04/03