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, 13 Aug 2022 20:54:29 +0300 Message-ID: <83wnbckp0q.fsf@gnu.org> References: <83h72r16g1.fsf@gnu.org> <640c2e07-98e1-96d6-bb02-19f5f03f637f@yandex.ru> <834jyq29o1.fsf@gnu.org> <92da07bd028e3ede61a6@heytings.org> <47894c57-dd8b-5778-240a-3fa6540e4d37@yandex.ru> <92da07bd02941d5537e9@heytings.org> <5308e3b5-a160-17d7-77ee-b1d00acfa20d@yandex.ru> <92da07bd02a6cc861e1a@heytings.org> <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33839"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 13 19:56:39 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 1oMvNG-0008de-KZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 19:56:38 +0200 Original-Received: from localhost ([::1]:40906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMvNF-0000vA-Lb for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 13:56:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMvLj-0007u9-As for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 13:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMvLi-0000qe-70 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 13:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMvLi-0007p3-39 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 13:55: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, 13 Aug 2022 17:55: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.166041329530053 (code B ref 56682); Sat, 13 Aug 2022 17:55:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 13 Aug 2022 17:54:55 +0000 Original-Received: from localhost ([127.0.0.1]:35058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMvLb-0007oe-Bk for submit@debbugs.gnu.org; Sat, 13 Aug 2022 13:54:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMvLZ-0007oS-5Q for 56682@debbugs.gnu.org; Sat, 13 Aug 2022 13:54:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMvLS-0000pS-4b; Sat, 13 Aug 2022 13:54:47 -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=fS3wHG+WcXTQpUIYNbur4AmSn9ClcNV+90P8mRZjMt8=; b=mafG1MQhHJsb 5yQE58KZje8L1sK0DYBd4GCS+GVtqSfSzXUSTWSNVurhQALK1AdgWKM98Bpv8HolMLwmYPnXZ1JRD VIWTawjze0fNPKeNCdhum8ozOxpilLpNEC625bALgWCNj4kKvgDBHa3L+m1xRRVfZ04cu64/W1OhN G7mXzkWgEN+9M2BprAN5ex3iepTfGmbNzebyzeu2nksxr7+1u9DxylNuWY3+eDsjP2V42JxN7GBFO LWkU2/bOLxwI/TkROliJN/X3ySFk42UKlOet5B+uu0ytxREh+wycBszqOn2+g1mICWGidmZRbXrsz xKufr/CuVlPEB70GxJwmDw==; Original-Received: from [87.69.77.57] (port=1293 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 1oMvLR-0006BT-K5; Sat, 13 Aug 2022 13:54:45 -0400 In-Reply-To: (message from Dmitry Gutov on Sat, 13 Aug 2022 20:20:04 +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:239577 Archived-At: > Date: Sat, 13 Aug 2022 20:20:04 +0300 > Cc: 56682@debbugs.gnu.org, Eli Zaretskii , > monnier@iro.umontreal.ca > From: Dmitry Gutov > > As soon as the file becomes very large, such that font-lock actually > becomes costly even in properly written major modes, we can still do one > of the two things: apply narrowing during font-lock, or fontify only the > beginning of the file. Fontifying only the beginning of the file doesn't help when the file is first shown at another point, like when Emacs or emacsclient is invoked with the +NN[:nn] argument, or the user uses saveplace or similar package. That's admittedly rarer than starting at the beginning, but it's a valid use case, and I wouldn't like us to dismiss it.