[Python-modules-team] Bug#474941: /usr/share/emacs/site-lisp/rst.el: untollerable slowness of rst.el

Trent W. Buck trentbuck at gmail.com
Tue Jun 3 05:40:24 UTC 2008


On Mon, Apr 07, 2008 at 10:06:25PM -0400, Yaroslav Halchenko wrote:
> rst mode is [unusably slow ...]  Also if I turn off Font lock - it
> gets back to speed

I run rst.el straight from upstream's subversion.  I do not use
flyspell at all.  Attempting to edit even a small (100 lines, all 70
columns of less) file with rst-mode active is VERY slow.  Just viewing
(as opposed to editing) such a file with rst-mode active is NOT
significantly slower than text mode.

Using M-x font lock mode RET to disable font locking in the rst buffer
removes the lag.  Therefore I suspect the font locking regexps are too
greedy, and should be reviewed by some elisp gurus.

Since I haven't had time to do this myself, I simply disable font
locking (i.e. colour) in rst buffers using the following in my .emacs:

    ;; rst is soooo sloooow
    (setq font-lock-global-modes '(not rst-mode))

Ideally, all of rst.el should be refactored under elisp guru
supervision, since there are some other obvious stylistic differences
from elisp best practices (e.g. algorithmically adding TOC faces,
thereby breaking M-x find-face).





More information about the Python-modules-team mailing list