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

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

Emacs very slow opening file


From: Chris Moore
Subject: Emacs very slow opening file
Date: Tue, 27 Sep 2005 22:58:41 +0200

I tried opening a debian 'patch' file in Emacs.  The Emacs process
appeared to hang, using all my CPU.  It wouldn't respond to C-g.

After chopping down my .emacs to see what triggered the problem, it
turns out that just using a minimal .emacs file like this triggers it:

  ;; -------
  (custom-set-variables '(global-font-lock-mode t nil (font-lock)))
  (find-file "bigfile")
  ;; -------

"bigfile" is the patch file, which I've cut down to a reasonable size
(1.3 Mb), and uploaded here:

  http://s89213869.onlinehome.us/bigfile

It takes the latest CVS Emacs on my 2.2GHz P4 PC 15 seconds to open that file.

If I change the .emacs to say the following, then the file opens
almost immediately:

  ;; -------
  (custom-set-variables '(global-font-lock-mode t nil (font-lock)))
  (defun y-or-n-p (prompt) (message "Not asking '%s'" prompt))
  (find-file "bigfile")
  ;; -------

So it seems to be some kind of interaction between y-or-n-p and
font-lock perhaps?

Note that the patch file is adding Emacs "file local variables" to a
whole bunch of files, which is probably confusing Emacs and causing
the problem.  Still, it would be good if Emacs could handle this more
elegantly.

Chris.


In GNU Emacs 22.0.50.13 (i686-pc-linux-gnu, GTK+ Version 2.8.3)
 of 2005-09-27 on chrislap
X server distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--with-gtk' '--with-xpm' '--with-jpeg' '--with-png' '--with-gif''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t


reply via email to

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