From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii Subject: bug#35453: 26.1; Poor performance of vertical-motion in large org buffer Date: Sun, 05 May 2019 18:58:52 +0300 Message-ID: <834l68lwoz.fsf__3866.53696639172$1557072152$gmane$org@gnu.org> References: <87pnpaob79.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83zhoatavq.fsf@gnu.org> <87k1f5ww0l.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> Return-path: Received: from eggs.gnu.org ([209.51.188.92]:51775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNJYc-0006j1-57 for emacs-orgmode@gnu.org; Sun, 05 May 2019 12:00:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNJYb-0001GS-8F for emacs-orgmode@gnu.org; Sun, 05 May 2019 12:00:06 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87k1f5ww0l.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> (message from Ihor Radchenko on Sun, 05 May 2019 09:05:46 +0800) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Ihor Radchenko Cc: 35453@debbugs.gnu.org > From: Ihor Radchenko > 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.