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: Sat, 04 Sep 2021 11:55:08 -0400 Message-ID: References: <838s0eyyjg.fsf@gnu.org> <83eea5ygub.fsf@gnu.org> <835yvgyijv.fsf@gnu.org> <83eea4wilj.fsf@gnu.org> <83a6kswfsh.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="345"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 04 17:56:14 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 1mMY1e-000ARe-2c for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Sep 2021 17:56:14 +0200 Original-Received: from localhost ([::1]:33888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMY1c-00073Z-6r for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Sep 2021 11:56:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMY0i-0006A5-Q2 for emacs-devel@gnu.org; Sat, 04 Sep 2021 11:55:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMY0g-00071q-0Q; Sat, 04 Sep 2021 11:55:15 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 10E6280677; Sat, 4 Sep 2021 11:55:14 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 53B0480497; Sat, 4 Sep 2021 11:55:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1630770912; bh=5Yl3pWUUhydf3cejyWUKZAdqB/SrYt58XjoDSeQnFhA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GbaGM8xm8vwXePK2bNTESSWe0ySgeUlUgzllFSSHmzzdjBKvmiXGdi6eYRDI/ETq/ uRkYVmCByulm9GtW8HORP86DkXsuAZG0kEYSjbEDbwvXoYMaG4JhCIwTjjF2fBY3N2 40VS3JRA97T9gKZHcO+BptSEBHFf5+HX8b1Xu0C8DJbJue6jm7dc5I5c2aeInEf33O OOUQmifxHUOWoA6OwHM4BNfUL4iJnH5EuMBm7Ns2ACfimEaVeSl1d6G7mhxaordAhz e5p/58wo613qfH/3+DlJPCqx4Dv1eRPaj+gs1DszK86a4gygY3KqIF7B2YRv8mFX3P 5xJ3zD72LiifQ== Original-Received: from milanesa (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BD09612034B; Sat, 4 Sep 2021 11:55:09 -0400 (EDT) In-Reply-To: <83a6kswfsh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Sep 2021 17:56:14 +0300") 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:273913 Archived-At: >> But my understanding of what you're saying is that you don't consider >> "how `jit-lock-bounds` are used" to be an internal detail. Instead you >> consider these to be part of the "protocol" that the writer of client >> functions needs to know in order for those functions to work correctly. >> And I can't understand why you'd think that. I think even in the >> current situation, none of what we have discussed has prompted a need or >> desire to change client functions: they're oblivious to the change >> being discussed. > We have the reason right before our eyes: what Alan needs to do. If > these details are not important, why does he work on changing them? His change is not to font-lock but to jit-lock. So it's consistent with my claim that it's a matter that's internal to jit-lock. >> If so, could you give some kind of scenario where that could happen? > Why do I need to come up with a scenario, when it's clear as a day > that programming blindly to an insufficiently documented interface is > asking for trouble? But the change under consideration does not affect the documentation of the API exposed to client functions, AFAICT. I'm not asking the author to program blindly. I just can't see any reason to specify any more precisely than saying that BEG...END can be any valid region in the buffer and that the function can use `jit-lock-bounds` to inform jit-lock of the region actually handled, where this `jit-lock-bounds` needs to cover BEG...END but is otherwise optional and only used for optimization purposes. [ This is largely consistent with what you wrote in the docstring, so it seems we agree on this part. ] The precise way in which jit-lock uses this info for optimization purposes is something that may change (and hence should not be part of the contract/documentation) as evidenced by the fact that Alan already has 2 proposed patches that change it in different ways, and I myself described yet another possible way it could be used. Stefan