emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setnu-mode and Emacs 21.


From: Stefan Monnier
Subject: Re: setnu-mode and Emacs 21.
Date: Wed, 14 Nov 2001 09:29:39 -0500

> Juanma Barranquero <address@hidden> writes:
> > If creating hundreds or thousands of overlays does not work
> > (performance-wise), then other features that could profit from it
> > working right will also be slow, and won't be "fixed" by the
> > line-numbering-specific change you're suggesting.
> 
> I think working hard to speed up overlays is the wrong approach,
> because it will always fail as soon as the file gets big enough, and
> because speed is almost always at odds with flexibility.
> 
> Perhaps the right thing to do is to have an interface that lets user
> code create overlays only for parts of the buffer that are displayed
> (and allows undisplayed overlays to eventually go away).  The
> `jit-lock' font-lock mode does something similar (I think), but I don't
> know enough about it to say whether it could be used for other purposes.
> If not, then maybe the mechanism it uses could be extended.

I changed glasses-mode (which often uses more than one overlay per line)
to use jit-lock for that kind of reason.  But it doesn't do the
"get (slowly) rid of undisplayed overlays".  I thought about adding such
a thing to jit-lock.

>From my understanding overlays aren't that slow as far as redisplay
is concerned.  Their slowness seems to only show up when the buffer
is modified (because of the need to update all those markers).
We should maybe change them to not use markers (use something more
like the text-property approach where the buffer positions are
relative so that only a few places need to be updated for each
buffer change).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]