emacs-devel
[Top][All Lists]
Advanced

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

Default of jit-lock-stealth-time


From: David Kastrup
Subject: Default of jit-lock-stealth-time
Date: Sun, 25 Feb 2007 13:13:08 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

Hi,

I think that for the release, we should set jit-lock-stealth-time to
nil rather than its default of 16.

The reason is that Emacs wastes time fontifying buffers that might
never get displayed.  In addition, for problematic font-lock files,
Emacs' overall response gets sluggish, the cursor display gets
erratic, and system load goes up for no conceivable reason.

The problem is exacerbated when one has lots of buffers open and uses
desktop.el or similar packages.

For example, one of my buffers tends to be texbook.tex for reference
purposes.  This has unbalanced $ signs which make the syntax
highlighting thrash a lot.  It renders my whole system unresponsive
because an unattended Emacs session will at some point of time start
wasting cycles on a file that I have not accessed for days, and likely
will not access for several more days.  Apparently, the stealth
fontification gets stuck without useful progress.  In contrast,
opening the file directly will finish the problematic areas pretty
much immediately.

Other people might have fewer problems, but I would ask any developer
defending this default setting to customize
jit-lock-stealth-verbose
to t and then see in daily use whether he thinks the results a good
idea.

Personally, I am very much of the opinion that we should not enable
_any_ actions by default that can potentially waste considerable
amounts of CPU power in areas not immediately related to user
interaction.

Regardless of the system load: the load may be low at the moment
_exactly_ because the user terminated all processes that would disturb
the interactivity of his current work, and I think it a mistake that
Emacs considers the CPU fit for grabbing for its own purposes unless
the user _explicitly_ asked for it.

Whether it would be desirable to apply more fixes to stealth
fontification, I have no idea.  But the default enabling of it is a
mistake in my book regardless of whether it can be made less onerous.

The problem is exacerbated since it is impossible to guess what the
problem is when your system goes irresponsive:

Setting debug-on-quit will not deliver a backtrace pointing to
jit-lock at all when you press C-g: C-g does not interrupt timers.

There might always be buffers that cause font-lock to behave badly.
Emacs should not attempt fontifying them unless the user puts them
on-screen.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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