emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Serious performace problems on Windows XP with new(!) GNU Emacs


From: Peter Tury
Subject: Re: Fwd: Serious performace problems on Windows XP with new(!) GNU Emacs v22 (both patched and unpatched EmacsW32 were tried)
Date: Mon, 30 Oct 2006 22:38:26 +0100

2006/10/20, martin rudalics <address@hidden>:
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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]