[Top][All Lists]

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

Re: setnu-mode and Emacs 21.

From: Richard Stallman
Subject: Re: setnu-mode and Emacs 21.
Date: Thu, 15 Nov 2001 01:35:21 -0700 (MST)

    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.

That is true.  If you want to work on speeding up the use of thousands
of overlays, please go ahead.

But success in such an endeavor can't be taken for granted, and even
if you make a big improvement, it won't make the line numbering feature
as efficient as a low-level implementation would be.  Remember that
deleting one line would require changing perhaps thousands of overlays
for the rest of the file.  Even if display of the overlays becomes
super fast, updating will take time.

    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).

This approach might perhaps work well enough; it's worth a try.

    Sure, it'd be great if overlays were faster.  Regardless of how fast
    they are, though, I think adding an overlay to every line of a file is a
    silly way to display line numbers...

Exactly.  The feature of line numbering is so basic that it justifies
ad-hoc code, if someone wants to write it.

So if anyone is interested in implementing line numbering
either by putting overlays on the visible lines or as a low-level
ad hoc feature, I invite you to work on it.

reply via email to

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