emacs-devel
[Top][All Lists]
Advanced

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

Re: Overalays and point-entered


From: Stephen J. Turnbull
Subject: Re: Overalays and point-entered
Date: Thu, 24 Sep 2009 10:07:17 +0900

Stefan Monnier writes:

 > Yes, you'd need to implement a get-overlays-at-pos.

This is non-trivial to implement efficiently.  The XEmacs
implementation is so (perhaps unnecessarily) complex that Richard once
wrote:

    I looked at the Lucid Intervals code, intending to merge it in, but
    changed my mind because I couldn't understand it.

(Presumably this should be understood as a cost vs. benefit tradeoff,
not an absolute impossibility, of course.)

It may not be as hard as Jamie? and Ben have made it, but I assure you
performance of this function will be important.  The best I've been
able to think of in alternative implementations is (I hope) O(log
buffersize) for this function, but the space cost is quite large,
O(buffersize).  (The constant for XEmacs, which implements text
properties using these objects, is at least 0.25 in regex.c in CC Mode
on a 32-bit machine, and would be nearly twice as much on a 64-bit
machine because the additional data structures contain many pointers.)




reply via email to

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