From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bug-reference-prog-mode slows down CC Mode's scrolling by ~7% Date: Fri, 03 Sep 2021 08:27:47 -0400 Message-ID: References: <83a6kuyysv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14121"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 03 14:31:13 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 1mM8Lg-0003VW-H6 for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Sep 2021 14:31:12 +0200 Original-Received: from localhost ([::1]:49608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM8Lf-00007b-Ac for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Sep 2021 08:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM8IU-00068X-F7 for emacs-devel@gnu.org; Fri, 03 Sep 2021 08:27:54 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM8IS-0001dN-1L; Fri, 03 Sep 2021 08:27:53 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AF839440345; Fri, 3 Sep 2021 08:27:49 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 50CE84403BD; Fri, 3 Sep 2021 08:27:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1630672068; bh=O+Xc10FZszl6Hq7BT+d2N6lu5lNi8y3hJBoEqZ7n36k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=E/kiS445pcw1GFQPfhc6DTIMAme7WJK8+lGFppla2DU7h07qLlVA/GpnXMJbxjGxf K0w+MS8gYLSR1nmFS8gRiDstLBtVdkUhP6v/MrPPzW0oznnVkIKfqy5Xe2yBtfKfiT W/v/Ig56KRILnffUi7YF7d0V2qEBrkvHeb2dObNTmnQ8P4mVTlRdd6hbofhXgsZK0y SgvR9OyYZrq25x2U8hZg7rUGozE+hr/T1yGMj+GGAW/SE9B58zpe2JKxJ67shqgI9u +2LZlk3bLAKpPc9zA4Id7ybi7Pmbu49Ys5RTIfNM59Z1PWCc19borLcMAGs8MKWsay fOb94pcqkyVpQ== Original-Received: from milanesa (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0B6B712041B; Fri, 3 Sep 2021 08:27:47 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Fri, 3 Sep 2021 10:47:41 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:273781 Archived-At: > Note that it is difficult to use the jit-lock-bounds returned by a > subsequent function, if they exceed the bounds returned by the first > function. To do this safely, we would have to re-run all the previous > jit-lock-functions on the newly enlarged region. This would be clumsy, > and wouldn't fit in well with our current scheme. That's not the only option, tho. We could also do the following: - mark with `fontified` the intersection of all the `jit-lock-bounds` received (like we do now). - mark the rest of those bounds with a new property which keeps track of those fontification functions that did not operate on them, so next time we need to jit-lock those pieces we only run the corresponding subset of functions. I'm not claiming it would work better, tho: it would be more lazy (more "jit") but it would also imply extra complexity when jitting because we'd need to look for this new property and obey it. > As for "fighting" to be the first function in j-l-f, I don't think that > should be a problem. We can document the new &optional parameter to > jit-lock-register (not yet implemented) to say "don't use this unless > you really know what you're doing". Indeed. Stefan