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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ihor Radchenko <yantar92 <at> gmail.com>
Subject: bug#57207: closed (Re: bug#57207: 29.0.50; Fontification is slow
 after e7b5912b23 (Improvements to long lines handling))
Date: Thu, 08 Dec 2022 10:07:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 57207 <at> debbugs.gnu.org.

-- 
57207: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57207
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Gregory Heytings <gregory <at> heytings.org>
To: 57207-done <at> debbugs.gnu.org
Cc: Ihor Radchenko <yantar92 <at> gmail.com>
Subject: Re: bug#57207: 29.0.50; Fontification is slow after e7b5912b23
 (Improvements to long lines handling)
Date: Thu, 08 Dec 2022 10:05:58 +0000
Ihor confirmed (privately) that this bug is fixed.  Closing.



[Message part 3 (message/rfc822, inline)]
From: Ihor Radchenko <yantar92 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to
 long lines handling)
Date: Sun, 14 Aug 2022 23:55:46 +0800
I am experiencing severe performance degradation on current master.

The degradation happens when working with Org files and I managed to
bisect the cause down to

e7b5912b235936b304701ba6b1e808d9b197fd4f is the first bad commit
commit e7b5912b235936b304701ba6b1e808d9b197fd4f
Author: Gregory Heytings <gregory <at> heytings.org>
Date:   Sat Jul 16 19:06:38 2022 +0000

    Improvements to long lines handling.
    
    * src/buffer.h (struct buffer): New field 'long_line_optimizations_p'.
    
    * src/buffer.c (syms_of_buffer): New variable 'long-line-threshold'.
    (reset_buffer): Initialize the 'long_line_optimizations_p' field.
    (Fbuffer_swap_text): Handle it.
...

I tried M-x profiler to find the cause, but the 3-4 second hangs are not
reflected in the profiler report.

debug-on-entry + manual stepping through the function revealed that the
hang happens when calling jit-lock-fontify-now.

I was able to trigger the slowdown when unfolding headlines hidden using
'invisible text property.

Do you have any idea what could be going wrong or how to debug things further?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



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.