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: Sun, 14 Aug 2022 21:52:27 -0400 Message-ID: References: <837d3lzv8n.fsf@gnu.org> <2c8d6755-cfe2-6559-3fde-3fa30ffb411e@yandex.ru> <83mtcgy44k.fsf@gnu.org> <83k07jx5jn.fsf@gnu.org> <866e510d-a060-7daa-d002-97861d056fa7@yandex.ru> <1144021660321893@iva5-64778ce1ba26.qloud-c.yandex.net> <12348081660379417@sas2-a098efd00d24.qloud-c.yandex.net> <66bbbb95983414e79637@heytings.org> <83wnbckp0q.fsf@gnu.org> <8e884ebe-2d2e-d599-15c3-a5cfe5e6b295@yandex.ru> <83o7wnl7ok.fsf@gnu.org> <036414cc-c711-efaf-ed5b-f8ccfaca0604@yandex.ru> <5900f20836753183a6ac@heytings.org> <5c22e38a-5dcd-860e-28a0-b4a5ede6a21b@yandex.ru> <877d3awb92.fsf@localhost> 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="10920"; 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 , Eli Zaretskii , Dmitry Gutov To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 03:53:11 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 1oNPHy-0002dJ-MH for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 03:53:10 +0200 Original-Received: from localhost ([::1]:44188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNPHw-0001mV-V5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 21:53:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNPHq-0001mM-QM for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 21:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNPHq-0003fO-FO for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 21:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNPHq-0003Ba-9h for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 21:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 01:53: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.166052836012213 (code B ref 56682); Mon, 15 Aug 2022 01:53:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 15 Aug 2022 01:52:40 +0000 Original-Received: from localhost ([127.0.0.1]:40133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNPHU-0003Au-88 for submit@debbugs.gnu.org; Sun, 14 Aug 2022 21:52:40 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNPHR-0003Af-Nm for 56682@debbugs.gnu.org; Sun, 14 Aug 2022 21:52:38 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 55D3B441329; Sun, 14 Aug 2022 21:52:31 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0A09A44091E; Sun, 14 Aug 2022 21:52:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660528350; bh=jEtH3p4f+ZmtGGq9+amMGzyqrWGbk5lppSyAa6VoQdg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HkBP3vF6KqA0hY//e3nCREdmD77lab1+aKP1qjifALHpogdV7sX/JHrA4X8Kn4DMp 2u+prsPHMOUi0BXajwQ+fXv3l1rq/4nU6rklAC35ZZUydMD6Q3yckfMQwTcVYkI2gt mWbqqV0fIY+YIpZY53OkeDMSfCLWYesycBkBKGlAVzf2E0dClEGiNXi1U5qlz6g3Zd makrICXrgjbbguwWSRWG16EOYIG/zRbCXB4mVBU6l+c6pNZBVPpBsyW66+100dmT1K RZo9Uddhh7burkC0CyTp3BVRpUbPRsx0qzegcrBGttJTyGLnciuCbafNijxyC0KsCG 7c1oPZHNwEQKg== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C97BF1201C3; Sun, 14 Aug 2022 21:52:29 -0400 (EDT) In-Reply-To: <877d3awb92.fsf@localhost> (Ihor Radchenko's message of "Mon, 15 Aug 2022 09:23:21 +0800") 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:239713 Archived-At: Ihor Radchenko [2022-08-15 09:23:21] wrote: > Dmitry Gutov writes: >> Do you have examples of such modes? >> Calling 'widen' inside font-lock-keywords is a bug, and the bugs should >> be fixed at the source. > widen inside save-restriction is likely used by Org mode (or will be). Why? > This is needed by Org parser to determine the syntax element at point. But font-lock widens before using Org-mode's `font-lock-keywords`, so there should be no need for Org-mode to widen in that case. Stefan PS: Not sure if Org-mode qualifies as a mode that is likely to suffer from the kinds of long-lines or large-file problems that Gregory has tried to tackle, tho. I've never seen an Org file with lines >10kB nor an Org file larger than 10MB.