From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Fri, 05 Aug 2022 05:03:25 -0400 Message-ID: References: <8c7321f2f3ac52bfee4b@heytings.org> <8c7321f2f3ec1ef81af9@heytings.org> <02e83b0e-1b5c-fe75-6e59-1f8ddff82d37@yandex.ru> <96f28fd8-6744-1925-0631-0095099362dd@yandex.ru> <74ddc877f1b74ab56d18@heytings.org> <83r11y5a9d.fsf@gnu.org> <83h72t5y2d.fsf@gnu.org> <83pmhg4le6.fsf@gnu.org> <83r11v1a9w.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2765"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56682@debbugs.gnu.org, gregory@heytings.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 05 11:05:25 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 1oJtGm-0000Yb-OV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 11:05:24 +0200 Original-Received: from localhost ([::1]:35560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJtGl-0005LP-AC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 05:05:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJtFU-0005L0-PT for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 05:04:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJtFS-00042a-0g for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 05:04:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJtFR-0006xD-Qq for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 05:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Aug 2022 09:04:01 +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.165969022126703 (code B ref 56682); Fri, 05 Aug 2022 09:04:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 5 Aug 2022 09:03:41 +0000 Original-Received: from localhost ([127.0.0.1]:56154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJtF7-0006wd-F5 for submit@debbugs.gnu.org; Fri, 05 Aug 2022 05:03:41 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJtF2-0006wL-FM for 56682@debbugs.gnu.org; Fri, 05 Aug 2022 05:03:39 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 120B68054F; Fri, 5 Aug 2022 05:03:31 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C310880394; Fri, 5 Aug 2022 05:03:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1659690209; bh=+DCnBC0IrqTOaOEHpiYgQzWsA8uZ1iTffgOKV/D4iKY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IUPLjtGo6yoEwWEMgPUGmCv7A62VGl7OrId0IKoMRnjtfpllf0r3O+THbo8T4SAxR +Y4xp6vuilS0Gz8R0r/GyE0QXX0Asf2oNo+54TvPDw2crbp4IKgNjfSrUQxUYmQ1WJ al7EMgLS+QhsL2Zh6ATZ6msjrSQBVl9OlsZmPqNm6F1myJMZphJp5BtkAQAr/IEkux OmEgAW20zklHGXq0bjBPEa7xUxpvOjySUhOUnqdw2maQxLASe3NUC35H265lxiZ344 1CWT1cMpEMmdNPdzyiyRQzd7T0zTghO51NP9uwJ/pinCXowZhvHWcn/mg7VfzD8l/C ry/tonCqKAZmA== Original-Received: from milanesa (unknown [46.44.221.102]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CB3DB120172; Fri, 5 Aug 2022 05:03:28 -0400 (EDT) In-Reply-To: <83r11v1a9w.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 Aug 2022 09:20:43 +0300") 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:238844 Archived-At: >> The use of `syntax-wholeline-max` in >> `font-lock-extend-region-wholelines` supposedly fixed this problem since >> it changed `font-lock` so it doesn't ask `syntax-ppss` to compute the >> whole line/buffer. > > It did? > And if it did, how is that better or different from a locked > narrowing? In terms of end-user behavior, it's very similar: it can break the `font-lock-keywords` part of font-lock but it still lets `syntax-ppss` look at the whole buffer and will thus still provide correct recognition of strings and comments, except when the major mode relies on `syntax-propertize-function` since that one also obeys `syntax-wholeline-max` and can thus misbehave in a similar way to the narrowing. The more important difference is that it can be tweaked/changed/broken/improved by any ELisp package without necessitating a recompilation of Emacs's C code, or ugly workarounds to escape the narrowing, like postponing the actual font-lock to a timer or some such. Stefan