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: Tue, 02 Aug 2022 14:57:25 +0000 Message-ID: <74ddc877f17a06d8f120@heytings.org> References: <837d46mjen.fsf@gnu.org> <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@heytings.org> <8c7321f2f36494299e61@heytings.org> <8c7321f2f336523624e3@heytings.org> <83r1202meh.fsf@gnu.org> <6020ffaf-9069-0070-76cf-a13379ef01b5@yandex.ru> <83les71ilg.fsf@gnu.org> <06c5560d-3009-e5a5-3d33-fe5d2ec32d6b@yandex.ru> 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="22938"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 16:58:22 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 1oItLh-0005jE-FT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 16:58:21 +0200 Original-Received: from localhost ([::1]:51056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oItLg-0006Hh-AO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 10:58:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oItLR-0006HD-EZ for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 10:58:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oItLO-0005Ht-GS for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 10:58:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oItLO-0000Sk-DG for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 10:58: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: Tue, 02 Aug 2022 14:58: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.16594522651756 (code B ref 56682); Tue, 02 Aug 2022 14:58:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 2 Aug 2022 14:57:45 +0000 Original-Received: from localhost ([127.0.0.1]:44706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oItL6-0000SE-CS for submit@debbugs.gnu.org; Tue, 02 Aug 2022 10:57:45 -0400 Original-Received: from heytings.org ([95.142.160.155]:35638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oItKp-0000Ro-1R for 56682@debbugs.gnu.org; Tue, 02 Aug 2022 10:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659452246; bh=Y6gBOvL+LD5xGQ4Y8nYHk++BJDnX9NgQMc5SEpG4rCA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=O5VaHArIGnvf0X+vyLcD2wOZbmEOc+h4AIP4/H5M6bHa4mZKOYboqgnM/v4CYqu3j aG89IsTeZmqF9PsVohv1UJIILABv2o3Cw3AtG2JQjIyhl0ZGCT1YCJ4JhK+3yxVsrY tiRyRyJ9PJbbUHacYirGxNoXL5qSg/gf8ea7LOs18jKWaTx6zl9Xt5lkJvJvMBgcV3 QiM52fREZaq2vPvJ35RmmL1KZOLrgEC8iA2sG8eKID119TFBGrspyhepo1OetGWRhB VcaMQ8NEyidciCMXR3XcQtvmIKqsau9VPSJ7gRGm4H7qYMnkyQ2i6Cq988B6AEUUcJ ph18D/SUW/5nQ== In-Reply-To: <06c5560d-3009-e5a5-3d33-fe5d2ec32d6b@yandex.ru> 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:238561 Archived-At: > > Regarding the long-standing bug reports, we did solve a bunch of issues > already. One major one, IIUC, was redisplay of already fontified text on > long lines. > Try to open the dictionary.json with Emacs on master a month ago. It's a small file (only 18 MB). On my computer just opening the file with emacs -Q takes 220 seconds. 220 seconds during which Emacs is completely locked, because of font-lock mode. If you're not convinced, turn font-lock mode off, open the file, and turn font-lock mode on. > > Another piece of the puzzle was added by Stefan in 15b2138719b340. > That looked promising, but sadly it had only a very limited effect. > > So perhaps we should re-evaluate the testing scenario to see where the > current bottlenecks are. If we current main issue is the 55s spent in > syntax-ppss, a more constructive approach would be to look into > optimizing parse-partial-sexp. Or even give up on certain scenarios, > admitting that waiting 55s once to visit the end of a 1 GB buffer is not > so bad (and that could part could also be sped up by setting > syntax-propertize-function to nil and using a very simple syntax table, > for instance). > It is bad, especially now that it became clear that in fact it's not "waiting 55s once" but "waiting 55s each time the buffer is modified and you move to another position in the buffer".