emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs hangs in jit-lock


From: martin rudalics
Subject: Re: emacs hangs in jit-lock
Date: Thu, 30 Nov 2006 10:29:36 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> I motion to change the default of jit-lock-stealth-time to nil.
> A non-nil setting may be useful for some situations, but nil is safer and
> more desirable for laptop use which is becoming the more prevalent
> machines nowadays.

I doubt that setting `jit-lock-stealth-time' to nil would solve problems
reported as

>>then load d-mode.el, associate d-mode with *.d, open all the *.d files
>>and try to edit, say, lispbibl.d close to the end of file.

and

> I see the same thing.  The header file below is a simple way to test
> it.  Just open it and hit C-v, and things will get very slow.
>
> <http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/mail/extern.h>
>
> Setting jit-lock-stealth-time to nil makes the problem go away.

These are not necessarily the "same things".  Suppose both problems were
caused by stealth fontification proper.  There would not be any need to
edit or scroll buffers to observe a slowdown.  However, the first author
tried to "edit the buffer close to the of file" and the second author
did open it and "hit C-v".  I can see two common points: (1) The major
mode involved was C mode and (2) there was some movement toward the end
of a buffer.

To check whether a problem is really caused by stealth fontification one
has to compare performance with stealth fontification turned off/on but
_without_ displaying the involved buffers in a window.  To detect
whether the slowdown is caused by parsing, it would suffice to open the
relative buffers, go to their ends, and stealthily fontify them without
displaying them.  Finally, to detect whether stealth fontification
simply "hangs" set `jit-lock-stealth-verbose' to t.

FWIW, I think that Alan's recent change to `beginning-of-defun-raw' is
the main culprit for the observed slowdown and it would be very easy to
spot it in the indicated way.  I don't use stealth fontification, hence
defaulting `jit-lock-stealth-time' to nil would just save me one line of
my .emacs.  On the other hand, it would mean throwing out the child with
the bathwater and not cure the real problem.





reply via email to

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