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: bug-reference-prog-mode slows down CC Mode's scrolling by ~7% Date: Sat, 04 Sep 2021 09:09:10 +0300 Message-ID: <837dfwyird.fsf@gnu.org> References: <83a6kuyysv.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10966"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 04 08:12:15 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 1mMOuV-0002hQ-LX for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Sep 2021 08:12:15 +0200 Original-Received: from localhost ([::1]:37082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMOuU-0006WU-NG for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Sep 2021 02:12:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMOrb-0003i0-3O for emacs-devel@gnu.org; Sat, 04 Sep 2021 02:09:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50506) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMOrZ-0002oN-4K; Sat, 04 Sep 2021 02:09:13 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2897 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 1mMOrY-0004Vd-N0; Sat, 04 Sep 2021 02:09:13 -0400 In-Reply-To: (message from Alan Mackenzie on Fri, 3 Sep 2021 20:51:22 +0000) 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:273837 Archived-At: > Date: Fri, 3 Sep 2021 20:51:22 +0000 > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > From: Alan Mackenzie > > OK, I've hacked up a trial implementation, though I haven't started > testing it yet. The key is to extract jit-lock--fontify-now-1 from > jit-lock-fontify-now, and have it call itself recursively to handle the > expansion of the region caused by a jit-lock-bounds returned by the > second or later function. > > This should be easy to test and verify as correct, yet the recursion > should be invoked rarely enough that it won't lead to inefficiencies. > > This implementation should resolve Eli's concerns about handling two > or more "first" functions in jit-lock-functions. Thanks.