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 14:24:17 +0000 Message-ID: <66bbbb95983414e79637@heytings.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> 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="25098"; 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 Sat Aug 13 16:25: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 1oMs4c-0006L3-Mm for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 16:25:10 +0200 Original-Received: from localhost ([::1]:50998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMs4b-0005Aw-MR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 10:25:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMs4U-0005Af-I5 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 10:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMs4U-0004nv-95 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 10:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMs4U-0000MJ-56 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 10:25: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 14:25: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.16604006761344 (code B ref 56682); Sat, 13 Aug 2022 14:25:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 13 Aug 2022 14:24:36 +0000 Original-Received: from localhost ([127.0.0.1]:34809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMs43-0000Lb-3L for submit@debbugs.gnu.org; Sat, 13 Aug 2022 10:24:36 -0400 Original-Received: from heytings.org ([95.142.160.155]:51292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMs3m-0000LD-SA for 56682@debbugs.gnu.org; Sat, 13 Aug 2022 10:24:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660400657; bh=GrKCXmBNOuS4GMBvrVvZWcsA3OXcpnFjS7mOhRmOiMg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Q7LypubjNQ0VmHaLPIR1tRewt2wNJwGJmM2whCZ1taiXfKnGpTXRgeAGD2UKEj03e FLxyNgtOSB4ZRyDTCdhozk5K9lwLXrxfllUNBlVR4kn3v9ZtBczE8sXIYBefB4n3AG TxxgbFgYDRVxpFcWtbSwMcaVzF24oanXmaQGWvHrHimsyLPwKcEFvorUGzRLX+vuk/ 0UCq/ylCIdc0kfX4DeS0Gd94iwUv1vY/QTUWsJxl/PqtUOcVoyEQ5Yf1RZgFP0AYX1 BFZjnoHZQGquZz/OmwJWVQIhn90SJL/vPvVwuSyF2D94ckDOV59+6WuONuy6gXw5L0 56FVZT/XqurjQ== In-Reply-To: <12348081660379417@sas2-a098efd00d24.qloud-c.yandex.net> 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:239550 Archived-At: > > But they're not. Of course, modes might have problematic rules > (font-lock-keywords are turing-complete, after all), but it might be > just as easy to fix all the main major modes rather than hobble user > experience. > You've made it quite clear that in your opinion incorrect font locking hobbles user experience more than multi-second delays between motion or search commands. Let's agree to disagree. > > Especially if we limit ourselves to modes that are likely to be used > with large files. > That's not the intention, no. > > So please go ahead and experiment, and report on your findings later. > I already did, and told you that these multi-second delays were still present in larger JSON files (and therefore also in smaller files with slower CPUs). > > Then the goal failed because we don't disable bidi hpa? It has a much > more noticeable effect on editing that font-lock. > That's not correct, no. The BPA algorithm makes C-n and C-p slower at the beginning of large files only in a very specific case: when the beginning of the buffer contains opening brackets whose matching closing bracket is at the end of the buffer. And the BPA algorithm does not cause multi-second delays. > > And of course if we wanted to make everything as smooth as possible on > every possible machine down to TI calculators, > That's not what I aim at, and I think you understood that. >> Which is why fixing js-mode, and adding a json-mode, as you did, is a >> "too local" fix. Of course, that doesn't mean what you did is useless; >> it only means that it cannot be considered as a general solution to the >> problem at hand. > > That's not what the branch contains. > You're playing with words. The fixes to js-mode and the added json-mode are not on the branch because you installed them on master, but what you claim the branch demonstrates depends on what you installed on master. Or do you claim that what the branch contains makes editing any other file (that is, not a .js or a .json file) almost as fast as what is on master?