emacs-devel
[Top][All Lists]
Advanced

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

Re: `make-overlay' very slow


From: Kenichi Handa
Subject: Re: `make-overlay' very slow
Date: Wed, 15 Apr 2009 12:56:36 +0900

In article <address@hidden>, Stefan Monnier <address@hidden> writes:

> > More radical idea, not related to overlays, is to make one
> > interval tree for one text property; i.e. one for `face',
> > one for `fontified'...  I think it not only improves the
> > processing speed, but also reduces the memory usage
> > (next-property-change will get slower, but we use
> > next-single-property-change more often).

> I've been tempted as well, but I'm not sure it'd be much of
> an improvement.  You'd end up with many trees, so might need
> a hash-table or some other tree to map text-property names to the
> corresponding interval tree.

I think the number of properties is not that much in normal
use and using just `assq' is sufficient.  I seldom see more
than 8 kinds of properties.  And, we can move the lastly
accessed interval tree to the head of interval tree list if
speed up is really necessary.

---
Kenichi Handa
address@hidden




reply via email to

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