GNU bug report logs - #57207
29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling)

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> gmail.com>

Date: Sun, 14 Aug 2022 15:55:01 UTC

Severity: normal

Found in version 29.0.50

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: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57207 <at> debbugs.gnu.org, yantar92 <at> gmail.com
Subject: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling)
Date: Tue, 16 Aug 2022 10:47:00 +0000
[Message part 1 (text/plain, inline)]
>
> Gregory, I suspect that the problem could be in the loop in 
> redisplay_window, where we look for long lines.  Changing visibility in 
> Org changes text properties, and that causes MODIFF to be incremented. 
> I actually can cause something similar without Org at all, just by 
> scrolling fast through xdisp.c.  You can put a breakpoint inside the 
> 'if' that guards the re-evaluation of the long-lines in 
> redisplay_window, and scroll with C-v through xdisp.c immediately after 
> visiting it -- I hit the breakpoint from time to time, although there 
> are no changes to the buffer except faces placed by fontifications.
>
> jit-lock runs under with-silent-modifications, but that only adjusts 
> SAVE_MODIFF to create an illusion of unchanged buffer, it doesn't affect 
> UNCHANGED_MODIFIED.
>

Indeed, that's problematic: modify_text_properties calls modiff_incr 
(&MODIFF, 1).  I think the safest change would be to use CHARS_MODIFF 
instead of MODIFF, see attached.

Ihor, can you please test that patch and tell us if it solves your 
problem?
[use_chars_modiff.patch (text/x-diff, attachment)]

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

Previous Next


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