2006/10/20, martin rudalics <[EMAIL PROTECTED]>:
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)))
What shall I check exactly here? I ran this white() and yes, it finishes in 1-2 seconds. However I also ran (M-:) (whitespace-buffer-search whitespace-ateol-regexp) and it also took 1-2 seconds on my problematic original source file (it has only one eol "error"). However with my slowtst.el I found the same difference what you wrote: white() finishes in 1-2 seconds, while M-: (whitespace-buffer-search whitespace-ateol-regexp) needs ~15-20 seconds to finish. So it seems this change could help a lot, but some other similar changes would be needed also. (I will check your newer patch also. However, I have never patched source files this way. If you can send the whole modified whitespace.el it might help me.)
Just to make sure: Turning off whitespace makes all performance problems disappear on your system?
Yes, it seems so. _______________________________________________ emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
