[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35453: 26.1; Poor performance of vertical-motion in large org buffer
From: |
Ihor Radchenko |
Subject: |
bug#35453: 26.1; Poor performance of vertical-motion in large org buffer |
Date: |
Sat, 18 May 2019 18:36:37 +0800 |
> There are no intervals in this story. The way overlays are
> implemented, they don't use intervals (if by that you mean the
> facilities in intervals.c). Someone was working on making overlays
> more efficient by changing the low-level implementation details, but
> that work is yet unfinished.
I see. Hope that overlays will be optimised eventually...
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Ihor Radchenko <yantar92@gmail.com>
>> Cc: 35453@debbugs.gnu.org
>> Date: Sun, 05 May 2019 09:05:46 +0800
>>
>> > Of course, if someone comes up with ideas how to speed up
>> > vertical-motion without changing what Org does with overlays and/or
>> > how overlays are implemented, such ideas will be most welcome.
>>
>> Rather dumb idea.
>> Currently, vertical-motion just loops over all the intervals in the
>> buffer. What if we optimise next-single-char-property-change and use it
>> in vertical-motion? Say, the interval data structure can extended. In
>> addition to the currently available pointers to next and previous
>> intervals, each (or just 'invisible') property of the interval might
>> also contain a pointer to next/previous interval with different property
>> value. Then, by increasing the structure size a bit, we can
>> significantly speed up the buffer motion commands.
>
> There are no intervals in this story. The way overlays are
> implemented, they don't use intervals (if by that you mean the
> facilities in intervals.c). Someone was working on making overlays
> more efficient by changing the low-level implementation details, but
> that work is yet unfinished.