Subject: Re: bug#76538: 31.0.50; 31.0.50; 31.0.50; feature/igc: using magit-section-cycle-global (S-TAB) and magit-section-toggle (TAB) in some random ways blocks GNU Emacs.

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 Feb 2025 15:24:23 +0200

> Cc: Pip Cet <[email-masked]>, [email-masked], [email-masked],
>  =?UTF-8?Q?Jo=C3=[email-masked], [email-masked], [email-masked],
>  [email-masked], [email-masked], [email-masked],
>  [email-masked]
> From: Ihor Radchenko <[email-masked]>
> Date: Tue, 25 Feb 2025 20:12:21 +0000
> 
> The reproducer involves 20+Mb magit buffer with a lot of text hidden.
> I toyed around with gdb a bit, and it appears to me that the problem is
> not with the number of markers. Rather an opposite. Marker cache does
> not help here initially and we need to scan all the way through 20Mb of
> bytes.

??? AFAIR, we perform binary search there, no?

Can you show the details of what you saw in GDB?

> In my testing, I looked into the total number of markers in the buffer,
> and it appears that the number is always fairly small.

How small?

> May someone more familiar with the code check if markers created in
> buf_charpos_to_bytepos might be created and immediately GCed? That's my
> impression (maybe totally wrong).

Why is the immediate GC a problem?  And why do you think there is an
immediate GC?  And finally, are we still talking about the igc branch
or about master (or both)?