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


Message #586 received at 56682 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gerd.moellmann <at> gmail.com, 56682 <at> debbugs.gnu.org, larsi <at> gnus.org,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#56682: Fix the long lines font locking related slowdowns
Date: Mon, 01 Aug 2022 13:38:40 +0000
[Message part 1 (text/plain, inline)]
>> diff --git a/src/xdisp.c b/src/xdisp.c
>> index 8a19b3bda9..9574d06bd5 100644
>> --- a/src/xdisp.c
>> +++ b/src/xdisp.c
>> @@ -3472,6 +3472,9 @@ init_iterator (struct it *it, struct window *w,
>>                          &it->bidi_it);
>>          }
>>
>> +      if (current_buffer->long_line_optimizations_p)
>> +       it->narrowed_begv = 0;
>> +
>
> Sorry, I wrote that this is OK, but it isn't: if init_iterator is called 
> with 'struct it' that was already initialized by a previous call to 
> 'reseat', the above will nuke the narrowing.
>
> So we need something more complicated.  ATM I don't see how to solve 
> this without manually initializing narrowed_begv before the first call 
> to init_iterator or start_display.  Hmm...
>

Hmmm...  So I wasn't completely wrong when I wasn't sure it was TRT 😉 
It's a chicken-and-egg problem.  On the other hand, even if we nuke the 
narrowing there, it will be recomputed two lines later, which should be 
okay.

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

Previous Next


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