From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Emacs Freezing With Java Files Date: Sat, 11 Feb 2023 10:16:17 +0200 Message-ID: <83pmagk46m.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10266"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 11 09:17:27 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQl4X-0002SM-Tw for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Feb 2023 09:17:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQl42-00047q-Ta; Sat, 11 Feb 2023 03:16:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQl3w-00047Y-G9 for help-gnu-emacs@gnu.org; Sat, 11 Feb 2023 03:16:48 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQl3w-00020d-7t for help-gnu-emacs@gnu.org; Sat, 11 Feb 2023 03:16:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2sgk0dWFod4+z0uPMyAgrXjVJsW+YT+/jMCLt4ZoC8o=; b=NavqTdWKxnr/ a3bG4e8tGl1UejLoHk+Ok2LGJDeDVVZwrZpKUJNmm9+OoLdKqoYFQEejBbGq95eFMsxUOs88LZXyB 5e+XyMlsL1q+V0WOzP3SCFYdjwZIhZggzatwJjaS1DTxMVBhlk8KhE/7z+3WizT/FXkaPCeZChL7H Gi+kBeEbTrrZ+ehq3r/NwVVZVwEMKCUrEiO6jCgf3K9L22KrGac9cUkm6aSsz538Kak+HS7zENv47 tYzPIlj+ESJjssd+/BcRxZGCn0CISwbt7Tkf3v7nxExcybvkFj59LH43hkk1RA9S+WvuJQKGeIHmS 8N+f5sJOPH7ukEhi7TLY/w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQl3v-0006iq-J2 for help-gnu-emacs@gnu.org; Sat, 11 Feb 2023 03:16:47 -0500 In-Reply-To: (message from Hank Greenburg via Users list for the GNU Emacs text editor on Sat, 11 Feb 2023 00:26:03 +0000) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142696 Archived-At: > Date: Sat, 11 Feb 2023 00:26:03 +0000 > From: Hank Greenburg via Users list for the GNU Emacs text editor > > I have a few Java files that are about 500 lines of code and I can't move around in them much before Emacs freezes. I first thought it was java-lsp but it still happened after disabling and uninstalling it. I also uninstalled lsp-mode as well, but that didn't change anything. > > I started doing CPU profiles of it and found that which-function-mode was taking up 67% of my CPU usage. While this is happening all I was doing was holding the down arrow until it froze about 350 lines in. Didn't press any other buttons. > > So I disabled which-function-mode and moved around the buffer just fine! Though when trying to edit the file (just hit enter), it froze again. This time it seems like electric-indent-mode was taking up close to 50% of my CPU usage. > > I disabled that and tried again and then it froze again with c-indent-line-or-region eating up 63% of my CPU when I use TAB. > > While using debug-on-quit I get the below output. Any idea what's happening here and how it can be addressed? I tried large files of other types and it only seems to happen with Java files. I attached screenshots of the CPU profiler outputs for each of the three scenarios. > > I thought about submitting a bug report but I can't figure out what is fundamentally the cause here. I do know though that if I launch emacs with the -Q argument, then there aren't any problems at all. Please do submit a bug report for this. Include in the bug report at least one of the files that cause this issue, and the profiles you collected If "emacs -Q" doesn't reproduce the problem, please try to come up with the minimal set of customizations from your init files which does cause the problem, and post that as well. In general, only reporting problems with all the details as bugs guarantee that the Emacs maintainers will investigate the problem and try to fix it. > I am using emacs version 28.2 on EndeavorOS. Would it be possible for you to build the emacs-29 branch of the Emacs Git repository, and see if the problem exists there as well?