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: Wed, 10 Aug 2022 12:31:24 +0000 Message-ID: References: <83r11uzs8n.fsf@gnu.org> <14845631-c2ef-8371-8606-c858092e3192@yandex.ru> <83mtcizov2.fsf@gnu.org> <83h72qzheq.fsf@gnu.org> <25717d84-3411-a93a-3620-e04fe0571aff@yandex.ru> <83edxuzemr.fsf@gnu.org> <83a68hzz0a.fsf@gnu.org> <6ae35c93062c589b2e02@heytings.org> <7b7fbad7-55ac-49b8-840f-7f89a7e8771a@yandex.ru> <6ae35c93064b3588974c@heytings.org> <6ae35c9306c515f420d8@heytings.org> <87k07gwkjq.fsf@gmx.net> <87fsi4wiel.fsf@gmx.net> <837d3gs4p0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3541"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, stephen.berman@gmx.net, monnier@iro.umontreal.ca, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 10 14:32:40 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 1oLkt6-0000kB-IH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 14:32:40 +0200 Original-Received: from localhost ([::1]:53802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLkt5-0007LN-HL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 08:32:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLksU-0007Iv-7q for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 08:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLksT-0003cB-UW for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 08:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLksT-00086s-QL for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 08:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Aug 2022 12:32:01 +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.166013468731113 (code B ref 56682); Wed, 10 Aug 2022 12:32:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 10 Aug 2022 12:31:27 +0000 Original-Received: from localhost ([127.0.0.1]:46789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLkrv-00085l-Cd for submit@debbugs.gnu.org; Wed, 10 Aug 2022 08:31:27 -0400 Original-Received: from heytings.org ([95.142.160.155]:47172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLkru-00085f-58 for 56682@debbugs.gnu.org; Wed, 10 Aug 2022 08:31:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1660134685; bh=fu12Kgd2B7m0JKOwjiVx5KM3ieNKGE1g+smUFMD3BYc=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=6iRIqVWx5LnRcJuudsbR3qFedMOaijthJVIr6fNWzTnCr23aRkw3IDIWojvGHaxa7 Gt0voYMZrF3gvYLFV5jG5fs+Xg6o+bf2tS3di1R4RNSKeHO+lm0FaW2v3j1NKZEn35 D7xtYDmLuYgNe6kj/IVXwy9IP6ZcgzQBLlrTyLu/ehnR4zhsfQ7djrh5F3MUFkOruM 8kWdgkrHqQMKGql+U/zvszsLVdSnHw98EW4OoQu0QMd+HX5SMxRO1oAET/R9M178+v g7GLUQVfImGSMffl4JqQTnZDCt/J+NIqQEfUb1WKuDzls/nFu3fl1IzfjVesS6LEvr nH9W+sT8aKSsw== In-Reply-To: <837d3gs4p0.fsf@gnu.org> 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:239281 Archived-At: >> Another option might be to add some limits to the algorithm in buffers >> with long lines, without disabling it completely. > > It already has such limits and other optimizations. > Yes, I meant making them a bit lower in such cases. > > Inhibiting the BPA is an option if it is known that the buffer doesn't > include ant R2L characters anywhere; otherwise some braces/parens could > be displayed incorrectly mirrored. > But is there an efficient way to determine if that the buffer doesn't include any R2L characters? > > If you remove the 3 closing braces/brackets at EOB and the corresponding > opening braces/brackets, does navigation become significantly faster? > Yes, removing the 3 brackets at positions 1, 22, 23 and 19538, 19539 and 19540 solves that problem. In fact, just removing the brackets at 1, 22 and 23 solves that problem. You can see the same problem in dictionary.json, just removing the first character makes C-n and C-p faster at BOB.