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.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Sat, 30 Jul 2022 13:59:32 +0300 Message-ID: <83lesa6f3f.fsf@gnu.org> References: <837d46mjen.fsf@gnu.org> <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15375"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 30 13:00:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oHkCf-0003pX-Ct for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jul 2022 13:00:17 +0200 Original-Received: from localhost ([::1]:35902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHkCe-0007zk-HK for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Jul 2022 07:00:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHkCR-0007za-3A for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHkCQ-0005AK-Q9 for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHkCQ-0003ia-KF for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 07:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jul 2022 11:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.165917879014248 (code B ref 56682); Sat, 30 Jul 2022 11:00:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 30 Jul 2022 10:59:50 +0000 Original-Received: from localhost ([127.0.0.1]:34102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHkCE-0003hk-2y for submit@debbugs.gnu.org; Sat, 30 Jul 2022 06:59:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHkC9-0003hS-5B for 56682@debbugs.gnu.org; Sat, 30 Jul 2022 06:59:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHkC3-00058r-Uf; Sat, 30 Jul 2022 06:59:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=PR2Z7Pc9WtlVGap2iINxu89m+14noJ0NhfFfj3EN9RQ=; b=mXQJQCC9iMij T4Ijh0UOvIsAA1I6z0zrf9GNGMteLlQC1sYd6vSlCAlrE4MimLvkpyQbR7D+NYhSFFAAR7NccSix/ QVmaqdYFpB/wphzbQwD0M8veoqCQQJaEPO7TwXik+jwiRHmLHHfNXjeVVr+UUBZ7/qd0fj2psX3CZ UkIJYARxWyFSDiMLBZQhyrqKogXE1SsP8IBlS4wPShzRLoCeDHh8Y3njFcqkExEb+cfylpKzGyJ+p GKHXNhsIxiTD8Kmn92l4Wh+1gQqLzapJf6K+EjVfzMuEgJ4tiZ8L8kg6xwhkqQiitfpTez06JAMEd iW7nnLs0QqB2PXs759EnIw==; Original-Received: from [87.69.77.57] (port=3971 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 1oHkC3-00017Y-Ee; Sat, 30 Jul 2022 06:59:39 -0400 In-Reply-To: <65cb7c73fd4a999cca00@heytings.org> (message from Gregory Heytings on Sat, 30 Jul 2022 10:52:48 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238250 Archived-At: > Date: Sat, 30 Jul 2022 10:52:48 +0000 > From: Gregory Heytings > cc: Stefan Monnier , 56682@debbugs.gnu.org > > >> I'd suggest to keep things mostly as they are but move the decision to > >> ELisp: i.e. pass the beg..end limits to jit-lock and let jit-lock do > >> the narrowing. This way it's easy to later refine the mechanism. > > > > That's already happening: code called via fontification-functions can > > access the restriction via point-min and point-max. If you or someone > > else can come up with efficient methods of using that information so as > > not to go too far forward and back, we could consider removing the lock > > from the narrowing. But we'd need to see the code first and assess the > > resulting performance with long lines. > > > > IIUC, what Stefan suggests is the following, which seems (almost) fine to > me. I fail to see the difference, sorry. Instead of doing the narrowing from C we leave it to jit-lock, but tell it the limits to narrow to? Or am I missing something?