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: martin rudalics
Subject: Re: Fwd: Serious performace problems on Windows XP with new(!) GNU Emacs v22 (both patched and unpatched EmacsW32 were tried)
Date: Fri, 20 Oct 2006 08:09:19 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> 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?





reply via email to

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