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: Sat, 13 Aug 2022 19:54:18 +0000 Message-ID: <66bbbb95983c3923df25@heytings.org> References: <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> <83y1vtmjld.fsf@gnu.org> <8868631660327773@iva2-775ff39c77bc.qloud-c.yandex.net> <83pmh4n0t8.fsf@gnu.org> <83a688md9r.fsf@gnu.org> <66bbbb95982d148fd1bc@heytings.org> <66bbbb95986014f48e4c@heytings.org> <7747f63b-5cf7-4c40-78ab-98aa7d1a8bc3@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="19974"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 13 21:55: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 1oMxED-0004yH-4e for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 21:55:25 +0200 Original-Received: from localhost ([::1]:42566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMxEC-00039N-0U for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 15:55:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMxDq-00038z-SB for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 15:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMxDq-0000qD-Il for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 15:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMxDq-0004Uv-EY for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 15:55: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: Sat, 13 Aug 2022 19: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.166042046117235 (code B ref 56682); Sat, 13 Aug 2022 19:55:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 13 Aug 2022 19:54:21 +0000 Original-Received: from localhost ([127.0.0.1]:35181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMxDB-0004Tu-D1 for submit@debbugs.gnu.org; Sat, 13 Aug 2022 15:54:21 -0400 Original-Received: from heytings.org ([95.142.160.155]:51754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMxDA-0004Tk-33 for 56682@debbugs.gnu.org; Sat, 13 Aug 2022 15:54:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660420458; bh=HAxrCD78UibL7ekWXZf/XnZkTi4fHolBO80abEVvwuI=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=3bTj3x/XPq59DNM6LS3iXzYvb+9LuFBRusLR5Fh+XiE8vZVwl0sVgDOD4bZSCHgpt 585lK7BD9J8BVa1GShjrrLQpMrA/n3HI8yG+TnLBgGmyvHe0ZzeJKjCBH90GwRW3dT 9n/+S8USXXkNPbrWCmo9UjYu5gjwGSYKBouR/p02sOgC2Xghmu2pbUuRmMvfr0uioB yRW9g+gs2sA1P0erkwQj0RlSJBJzOIlkt3mTi7Ns8YRMfnJMaUTYxdGSzu/JemXlBK XBilH8aOFLdqPp51cMMVD45aogPiaBFbW4Ihoyspd5yCv7CDgFRhAv2FIe0zt20BSY rI5Lb5GwvXBkA== In-Reply-To: <7747f63b-5cf7-4c40-78ab-98aa7d1a8bc3@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:239591 Archived-At: >> We had that discussion a month ago, and concluded that local fixes in >> every major (and minor) modes were not the way to go. Having that >> discussion again does not seem fruitful. > > Did you have that discussion with other people who have not authored a > single major mode? That's ridiculous. > You mean, Eli, Lars and me? I agree with you, we're indeed ridiculous. > > It showed specific pitfalls we can take care of in other major modes as > well. > It doesn't. Please do (on you Core i9 computer): for i in $(seq 1 60); do cat dictionary.json; done > hugedictionary.json Now open that file with the code on master, and with your branch, and type M->. With the code on master the effect is instantaneous (about 50 ms on my computer), with your branch it takes ~20 seconds (21 seconds on my computer). If you cannot see the difference, I don't know what else I could say. And please don't tell me "but this is not the kind of file size we should care about". That would be wrong, both because we do care about that file size, and because if that basic operation takes 20 seconds in a 1 GB file on your Core i9 computer, that same basic operation will take 20 seconds on a 20 MB or 50 MB file for someone else who has a slower CPU. Again, the right thing to do here is to improve the efficiency of syntax-ppss in one way or another. Of course, doing that is several orders of magnitude more difficult than just undoing what others have already done and claiming that the result is better.