From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Default of jit-lock-stealth-time Date: Sun, 25 Feb 2007 13:13:08 +0100 Message-ID: <85tzxazb8r.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172405619 6921 80.91.229.12 (25 Feb 2007 12:13:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2007 12:13:39 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 25 13:13:32 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HLIFu-0000fN-R4 for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2007 13:13:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLIFu-0005qs-Aa for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2007 07:13:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HLIFh-0005pz-IW for emacs-devel@gnu.org; Sun, 25 Feb 2007 07:13:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HLIFf-0005nb-Ax for emacs-devel@gnu.org; Sun, 25 Feb 2007 07:13:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLIFf-0005nY-2C for emacs-devel@gnu.org; Sun, 25 Feb 2007 07:13:15 -0500 Original-Received: from mail-in-10.arcor-online.net ([151.189.21.50]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HLIFe-0002uH-K1 for emacs-devel@gnu.org; Sun, 25 Feb 2007 07:13:14 -0500 Original-Received: from mail-in-14-z2.arcor-online.net (mail-in-14-z2.arcor-online.net [151.189.8.31]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id 393B51F5598 for ; Sun, 25 Feb 2007 13:13:13 +0100 (CET) Original-Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-14-z2.arcor-online.net (Postfix) with ESMTP id 1FE8E10104 for ; Sun, 25 Feb 2007 13:13:13 +0100 (CET) Original-Received: from lola.goethe.zz (dslb-084-061-061-024.pools.arcor-ip.net [84.61.61.24]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 04CF84211 for ; Sun, 25 Feb 2007 13:13:12 +0100 (CET) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 4AFFE1D17413; Sun, 25 Feb 2007 13:13:08 +0100 (CET) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66790 Archived-At: 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