From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Slow movement in large buffers Date: Tue, 15 Mar 2011 18:42:01 +0100 Message-ID: <8D34911D-B334-4543-9D6F-4A3A34F27BCF@gmail.com> References: <87d3ltjc8x.fsf@fastmail.fm> <87wrk0r6p3.fsf@ucl.ac.uk> <87fwqoy26k.fsf@fastmail.fm> <87fwqowk4v.fsf@ucl.ac.uk> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=39547 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzYG1-00068v-5L for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 13:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzYFy-0002pe-M7 for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 13:42:08 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:54126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzYFy-0002pS-CF for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 13:42:06 -0400 Received: by wwi18 with SMTP id 18so2821542wwi.0 for ; Tue, 15 Mar 2011 10:42:05 -0700 (PDT) In-Reply-To: <87fwqowk4v.fsf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: Matt Lundin , Org Mode On 15.3.2011, at 15:09, Eric S Fraga wrote: > Hello, >=20 > following up on this issue, I have just run into it again. I'm = editing > a not very large document and suddenly things slowed down, mostly but > not exclusively for "next-line": >=20 > --8<---------------cut here---------------start------------->8--- > next-line 18 = 2.1547069999 0.1197059444 > previous-line 19 = 0.4066669999 0.0214035263 > org-mode-flyspell-verify 16 = 5.299...e-05 3.312...e-06 > --8<---------------cut here---------------end--------------->8--- >=20 > This happened when I started a new source code block (gnuplot, to be > exact) but didn't type in the end_src line for a while. The problem > seems to be due to font-locking and it tries to font-lock the whole > document initially. When I eventually get around to typing the = end_src > line, it font-locks correctly but things are slow thereafter. There > seems to be some hysteresis loop in the code... This sounds like a bug that needs to be fixed in the block = fontifications, maybe a limit for how far to search for the end line. regular = expressions that match many lines need to be carefully constructed - there are = possible backtracking traps that can make the matching time scale as the number = of characters squared. - Carsten >=20 > If I kill the buffer and reload the file, everything is fine. >=20 > --8<---------------cut here---------------start------------->8--- > next-line 17 = 0.0655900000 0.0038582352 > previous-line 17 = 0.0115249999 0.0006779411 > org-mode 1 = 0.007178 0.007178 > org-fontify-meta-lines-and-blocks 25 = 0.0022920000 9.168...e-05 > org-set-startup-visibility 1 = 0.001619 0.001619 > org-raise-scripts 25 = 0.0013889999 5.555...e-05 > --8<---------------cut here---------------end--------------->8--- >=20 > Dramatic difference! >=20 > --=20 > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 > : using Org-mode version 7.5 (release_7.5.38.gf8c6.dirty) >=20