From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Norden Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Remove obsolete fast-lock and lazy-lock libraries Date: Sat, 08 Aug 2020 23:04:42 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40698"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, monnier@iro.umontreal.ca To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 09 06:05:26 2020 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 1k4caL-000AKj-TG for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Aug 2020 06:05:25 +0200 Original-Received: from localhost ([::1]:60012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4caK-0007It-No for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Aug 2020 00:05:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4cZn-0006na-Mv for emacs-devel@gnu.org; Sun, 09 Aug 2020 00:04:51 -0400 Original-Received: from mta.tntech.edu ([149.149.2.87]:57750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4cZl-00044f-DL for emacs-devel@gnu.org; Sun, 09 Aug 2020 00:04:51 -0400 Original-Received: from math.tntech.edu (unknown [149.149.102.6]) by mta.tntech.edu (Postfix) with ESMTPS id 94C583000051; Sat, 8 Aug 2020 23:04:44 -0500 (CDT) Original-Received: from norden.tntech.edu ([149.149.102.4] helo=norden.math.tntech.edu) by math.tntech.edu with esmtp (Exim 4.92) (envelope-from ) id 1k4cZe-0002NE-84; Sat, 08 Aug 2020 23:04:42 -0500 Original-Received: by norden.math.tntech.edu (Postfix, from userid 742) id 33AF52572B73; Sat, 8 Aug 2020 23:04:42 -0500 (CDT) In-Reply-To: (emacs-devel-request@gnu.org) X-SA-Spam-Score: 0.0 X-SA-Spam-Report: Spam detection software, running on the system "math.tntech.edu", has NOT identified this incoming email as spam. If you have any questions, contact @@CONTACT_ADDRESS@@ pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) Received-SPF: pass client-ip=149.149.2.87; envelope-from=jnorden@tntech.edu; helo=mta.tntech.edu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/09 00:04:44 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:253525 Archived-At: > One thing to note is that I've kept the support for > 'font-lock-support-mode' set to nil since Alan Mackenzie indicated > that this could be useful for debugging purposes here: > https://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00748.html > Perhaps it should be changed into a defvar, though. Or maybe it is no > longer useful. But that could in any case be done separately, I think. I discovered (setq font-lock-support-mode nil) just a few weeks ago, and found it to be a helpful tool for debugging fontification code. It simplifies things by letting you temporarily take the jit-lock layer entirely out of the picture. Once things are working without jit, you can then use jit-lock-debug-mode to further narrow down issues. A variable name like font-lock-use-jit might be more clear, maybe with font-lock-support-mode as an obsolete alias, which would now only have a nil-or-non-nil effect. Perhaps this would be good to do along with removing {fast,lazy}-lock. If someone has an ancient .emacs that contains (setq font-lock-support-mode 'fast-lock-mode) would the best thing be to just use jit-lock-mode instead? If I'm reading the patch correctly, it would make setting the support-mode to fast-lock equivalent to setting it to nil. It might make sense to also drop the defcustom status of the support-mode variable (or its replacement), since jit-lock is the only non-nil option. Things can still be pretty slow without jit, despite comments in the 2011 post that is referenced above. On my computer (a relatively current intel i5), fontifying all of xdisp.c (1.1MB) takes about 8.3 sec with the default c-mode. This could become a problem when font-lock-maximum-size goes away. (I got this time by setting font-lock-support-mode to nil, opening xdisp.c, which is now un-fontified b/c of its size, and then 'M-x benchmark' followed by (font-lock-fontify-buffer)). -Jeff