> As far as I know normal font-lock solves this problem by colorizing
> only some parts of the file (~what can be seen in the buffer
> actually(?)). Would it be too hard to modify whitespace to work in
> this way?
It's jit-lock actually. The problem is that whitespace is written in an
XEmacs-compatible manner and introducing jit-lock dependency would break
that.
> (Though I still think that the real problem is introduced
> outside of whitespace.el).
Try the below. It mimics the ateol part of the `whitespace-buffer' loop
and completes on my system in less than 4 seconds. The analogous part
of `whitespace-buffer' takes almost 30 seconds to complete. I can't
tell what makes the difference but I still suspect it's connected to
overlays.
(defun white ()
"white"
(interactive)
(require 'whitespace)
(remove-overlays)
(let (l)
(goto-char (point-min))
(while (re-search-forward "[ \t]+$" nil t)
(let ((overlay (make-overlay (match-beginning 0) (match-end 0))))
(overlay-put overlay 'face 'whitespace-highlight))
(push (match-beginning 0) l))
(message "%s" l)))
> At least I am happy to see that you could reproduce the error situation.
Just to make sure: Turning off whitespace makes all performance problems
disappear on your system?
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug