From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: cc-mode fontification feels random Date: Tue, 31 Aug 2021 16:18:22 +0300 Message-ID: <83wno1sqg1.fsf@gnu.org> References: <835yvmka50.fsf@gnu.org> <9377d9ec-a3e5-ceea-8a9a-523a420f13f7@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4810"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, dancol@dancol.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 31 15:28:54 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mL3os-00012r-4G for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Aug 2021 15:28:54 +0200 Original-Received: from localhost ([::1]:56836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL3or-0002PS-0f for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Aug 2021 09:28:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL3er-0000qe-R2 for emacs-devel@gnu.org; Tue, 31 Aug 2021 09:18:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35086) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL3eo-0005P8-4e; Tue, 31 Aug 2021 09:18:30 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3869 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL3en-0006Xe-I7; Tue, 31 Aug 2021 09:18:30 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 30 Aug 2021 16:11:18 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:273584 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , Alan Mackenzie , > emacs-devel@gnu.org > Date: Mon, 30 Aug 2021 16:11:18 -0400 > > `jit-lock-stealth-time` defaults to nil (i.e. stealth fontification is > disabled by default) for a good reason: it used to be enabled. > > The known downsides are: > - we don't have good input preemption > - it eats up your battery with no clear benefit > [ Because you end up re-fontifying the whole rest of the buffer after > every buffer modification. ] Regarding the second point: I'd like to put it back into the right perspective, as someone who has jit-lock-stealth turned on all the time. Yes, editing a buffer will trigger stealth fontification. But: . Unless you make jit-lock-stealth-time very small, fontifications only kick in if you stop editing, so they are unlikely to be as wasteful as it could sound, definitely not "after every buffer modification". . It is very rare to be editing many buffers at the same time. Typically, you edit a couple, and leave the rest alone, unmodified. E.g., my current session has more than 400 buffers, and that's not too many by Emacs standards, most of them are almost never edited. The upside, of course, is that my buffers are always fontified, and scrolling through them is much faster. And I seldom if ever use laptops for development.