From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <87mujk6ocq.fsf__15502.6848706015$1558175927$gmane$org@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> 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> <834l68lwoz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:51140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRwj4-0002i5-Vn for emacs-orgmode@gnu.org; Sat, 18 May 2019 06:38:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRwj3-0006Ua-VV for emacs-orgmode@gnu.org; Sat, 18 May 2019 06:38:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <834l68lwoz.fsf@gnu.org> 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: Eli Zaretskii Cc: 35453@debbugs.gnu.org > 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 writes: >> 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.