From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Fri, 05 Aug 2022 10:00:40 +0000 Message-ID: <92da07bd02c7a82676a2@heytings.org> References: <8c7321f2f388e5343475@heytings.org> <6ea376f6-d503-06d8-6d83-50c52b695394@yandex.ru> <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> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23394"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Eli Zaretskii , dgutov@yandex.ru To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 05 12:15:56 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 1oJuN0-0005s5-UO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 12:15:55 +0200 Original-Received: from localhost ([::1]:60280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJuMx-0006cM-3z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 06:15:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJu8c-0000Dp-Oz for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 06:01:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJu8c-00050D-GM for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 06:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJu8c-0008VC-6a for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 06:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Aug 2022 10:01: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.165969364632640 (code B ref 56682); Fri, 05 Aug 2022 10:01:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 5 Aug 2022 10:00:46 +0000 Original-Received: from localhost ([127.0.0.1]:56271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJu8M-0008UN-3H for submit@debbugs.gnu.org; Fri, 05 Aug 2022 06:00:46 -0400 Original-Received: from heytings.org ([95.142.160.155]:40090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJu8H-0008U8-O9 for 56682@debbugs.gnu.org; Fri, 05 Aug 2022 06:00:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659693640; bh=udLARLROWYctdo3vx2cHHXB3cE+jbhjn11sESf406cM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=3bSXviYVMeajgCPbdTJDePcoTiYFTwGfl8QU6u6GWJVdrvBAsJRUJxhmw+Zrlxbr9 G2nFHbL96x4BbjupGf1/hv7ZHSKa13YHjWAtDPfNy3cBgXPqSu+VNnm3w41jSq8Cx/ YVwmIohNu3/OefmQhQAAbcNlu90i8WVP3jW7CPf9ePGfuUIqvJkvzoM30G9hh7vf2u K22iNhUBYTgghJVjhllQGIILd9KOZ9IKtAsq917Mk1wj6dVmfn8jb4ophlWFy2Mjy5 +56txfGm+I4pzKHESRmGPu0tzyG9rQIjaWYyysQyDoPkegGh8dJ80yRPvsKXhN/IhP ya63uSRmSRZng== In-Reply-To: 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:238850 Archived-At: >> If it's font-lock that forces syntax-ppss to examine the whole huge >> line, then what is your proposal for avoiding that which doesn't >> involve some more-or-less arbitrary restrictions on the part of the >> buffer that can be examined by syntax-ppss? > > 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. > Actually, it didn't, it made things better in some cases, but (much) worse in other cases. You may have seen the recipes I sent to Dmitry a few days ago: emacs -Q M-: (setq long-line-threshold nil syntax-wholeline-max most-positive-fixnum) RET C-x C-f dictionary.json RET y ;; takes 160 seconds C-e ;; takes 200 seconds emacs -Q M-: (setq long-line-threshold nil) RET C-x C-f dictionary.json RET y ;; immediate C-e ;; not finished after 1200 seconds (20 minutes), I killed Emacs emacs -Q C-x C-f dictionary.json RET y ;; immediate C-e ;; immediate