GNU bug report logs - #56682
Fix the long lines font locking related slowdowns

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Thu, 21 Jul 2022 18:01:01 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: 56682 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, monnier <at> iro.umontreal.ca, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#56682: Fix the long lines font locking related slowdowns
Date: Wed, 10 Aug 2022 12:55:00 +0200
On Wed, 10 Aug 2022 10:34:32 +0000 Gregory Heytings <gregory <at> heytings.org> wrote:

>>> That's not expected, no, and rather surprising because it would contradict
>>> what we've seen so far.  Can you post that file somewhere?
>>
>> It contains nothing particularly personal, so I've attached it.
>>
>
> Thanks.  A last question: what CPU does your computer use?  I do see a (very
> slight) stuttering here, certainly not "several seconds".

i7-8700 CPU @ 3.20GHz with 6 cores (12 processors).  (It's somewhat
throttled due to Meltdown and Spectre mitigations.)

> Anyway, this file is too small for you to see the effect/benefits of long line
> optimizations.  The cause of the delays you see is the "Bidirectional
> Parentheses Algorithm" which is used by Emacs, and which you can disable by
> setting bidi-inhibit-bpa to t.  It makes C-n and C-p an order of magnitude
> slower in that file.  On my computer and in that file, they take 50 ms with
> bidi-inhibit-bpa nil and 5 ms with bidi-inhibit-bpa t.  So far I don't think
> these delays are annoying enough to disable that algorithm by default in files
> with long lines.  Another option might be to add some limits to the algorithm
> in buffers with long lines, without disabling it completely.

Indeed, setting bidi-inhibit-bpa to t eliminates the delay.  Thanks.

Steve Berman




This bug report was last modified 2 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.