On 15.3.2011, at 15:09, Eric S Fraga wrote: > Hello, > > 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": > > --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--- > > 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 > > If I kill the buffer and reload the file, everything is fine. > > --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--- > > Dramatic difference! > > -- > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 > : using Org-mode version 7.5 (release_7.5.38.gf8c6.dirty) >