Subject: bug#61436: Emacs Freezing With Java Files

From: Eli Zaretskii <[email-masked]>
Date: Sun, 12 Feb 2023 08:30:16 +0200

> Cc: [email-masked]
> Date: Sun, 12 Feb 2023 00:24:49 +0000
> From:  Hank Greenburg via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> To follow up on this, somehow disabling which-function-mode from my config has solved the problem. That
> doesn't make sense though because I didn't add that until after it had frozen in the first place. I know that for
> certain because I had to use IntelliJ and got the idea for using which-function-mode from IntelliJ. 
> 
> To clarify, this froze every single time I tried to edit the file no matter what modes I had turned on or off. It
> happened at least 40 times in total and never once was I able to actually edit the file within Emacs. After
> disabling which-function-mode though I have restarted Emacs a few times, written in the file, scrolled though
> it all without a single hiccup. 
> 
> So my problem is seemingly solved but there is an underlying bug somewhere that I'm not really able to
> isolate aside from disabling which-function-mode. 

If I visit the file you posted, and then turn on which-function-mode
in it, I cannot reproduce the freezes.  Scrolling through the file
becomes slower, but nowhere near "freezing".

Do you see something different when you enable just
which-function-mode in "emacs -Q"?