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

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 19 Aug 2022 17:50:03 +0200

Eli Zaretskii <[email-masked]> writes:

> Is it true that the call which makes the narrowing comes from
> safe_run_hooks_maybe_narrowed in your case?  If so, can you step
> through the code after the narrowing and try to figure out why isn't
> narrowing undone after the hook function returns?

I'm not sure, but that function is being called when I hit a key, at least:

Thread 1 "emacs" hit Breakpoint 3, safe_run_hooks_maybe_narrowed (hook=hook@entry=XIL(0xcc90), w=0x55555614ba18) at keyboard.c:1929
1929	{
(gdb) bt
#0  safe_run_hooks_maybe_narrowed
    (hook=hook@entry=XIL(0xcc90), w=0x55555614ba18) at keyboard.c:1929
#1  0x00005555556ed677 in command_loop_1 () at keyboard.c:1467
#2  0x0000555555767977 in internal_condition_case
    (bfun=bfun@entry=0x5555556ed300 <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5555556e0410 <cmd_error>) at eval.c:1497
#3  0x00005555556d89fe in command_loop_2 (handlers=handlers@entry=XIL(0x90))
    at keyboard.c:1132
#4  0x00005555557678b9 in internal_catch
    (tag=tag@entry=XIL(0xf7e0), func=func@entry=0x5555556d89d0 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1220
#5  0x00005555556d8999 in command_loop () at keyboard.c:1110
#6  0x00005555556dff68 in recursive_edit_1 () at keyboard.c:719
#7  0x00005555556e0310 in Frecursive_edit () at keyboard.c:802
#8  0x00005555555ad6a9 in main (argc=<optimized out>, argv=<optimized out>)