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.bugs Subject: bug#70796: 30.0.50; bug-reference-mode leading to constant GCing Date: Mon, 06 May 2024 17:03:22 +0300 Message-ID: <86msp3avh1.fsf@gnu.org> References: <86ttjbb1pu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40888"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70796@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 16:05:00 2024 Return-path: Envelope-to: geb-bug-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 1s3yxg-000AMM-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 16:05:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3yxN-00084r-9W; Mon, 06 May 2024 10:04:41 -0400 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 1s3yxL-00084M-3o for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 10:04:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3yxK-0002po-S1 for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 10:04:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3yxi-0004tl-KO for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 10:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70796 X-GNU-PR-Package: emacs Original-Received: via spool by 70796-submit@debbugs.gnu.org id=B70796.171500424318803 (code B ref 70796); Mon, 06 May 2024 14:05:02 +0000 Original-Received: (at 70796) by debbugs.gnu.org; 6 May 2024 14:04:03 +0000 Original-Received: from localhost ([127.0.0.1]:38277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3ywk-0004tD-PD for submit@debbugs.gnu.org; Mon, 06 May 2024 10:04:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3ywh-0004sk-7l for 70796@debbugs.gnu.org; Mon, 06 May 2024 10:04:01 -0400 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 1s3ywD-0002k2-Hn; Mon, 06 May 2024 10:03:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/mJValvjVPYr1wp7X52I78GadqzxYxwRpAwHJK3n/Og=; b=O532r2zsBGpN3Am1q5x1 ucgNvOg4VTk2n/b9aP4RQf318hHGhc1WoyAon+1eZCLvanlAeQvUlPDdn7ZrgIMaYk2mMir1REpjm YYipqv21P2HAhbfI2EEzocq6eu/1p1aepFwHmQoVp7BQp5y+dUbja5mD5RRUvdjX5Y75nEvBobBOH bDz3ODdNTHzDmm0bL5723XMJHRCE7u74aKd2NrdyMMJsxdeyxj/LrHb4ZS6esE4nJezEuXsD/frEk R/yG8ouExNKkcVUzQwDFx+UD9LwJKMPl+5MbH9lsPZQMw+Yr2F4zb5efwBFXG4z+IQWBeWNTEFzW6 eqyrczQsSOcYnQ==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Mon, 06 May 2024 14:35:42 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284580 Archived-At: > From: Gerd Möllmann > Cc: 70796@debbugs.gnu.org > Date: Mon, 06 May 2024 14:35:42 +0200 > > Eli Zaretskii writes: > > > Where's the evidence of "frequent GC" in this profile? > > I didn't say the profile is evidence of frequent GCs. > > > (And "memory profile" has nothing to do with memory usage, contrary to > > popular belief.) > > > >> Disabling bug-reference-mode in the Org buffer makes it stop constantly > >> GCing. > > > > I believe you. But showing the number of GCs (e.g., using the > > variable gcs-done) would tell us the story more convincingly. > > Alternatively, if you can share an Org file where this could be seen, > > please do. > > So, believe me. Or not, as you please. I said where the Org file is at > the beginning. Ah, okay, sorry for missing that. I tried to scroll through that with Emacs 30 from master, and here's the CPU profile: 20 74% Automatic GC 4 14% - command-execute 4 14% - call-interactively 2 7% - funcall-interactively 2 7% - scroll-up-command 2 7% scroll-up 2 7% - byte-code 2 7% - read-extended-command 2 7% - read-extended-command-1 2 7% - completing-read 2 7% - completing-read-default 2 7% - read-from-minibuffer 2 7% redisplay_internal (C function) 3 11% redisplay_internal (C function) 0 0% ... I get roughly one GC cycle per full scroll top to bottom. Interestingly, bug-reference-fontify is not in the profile, perhaps because it's lower-resolution than on your system with "memory" profiler. And here's the profile with bug-reference-mode turned off: 15 48% Automatic GC 8 25% redisplay_internal (C function) 8 25% - command-execute 8 25% - call-interactively 4 12% - funcall-interactively 3 9% - scroll-down-command 3 9% scroll-down 1 3% - scroll-up-command 1 3% scroll-up 4 12% - byte-code 3 9% - read--expression 3 9% - read-from-minibuffer 2 6% redisplay_internal (C function) 1 3% - read-extended-command 1 3% - read-extended-command-1 1 3% - completing-read 1 3% - completing-read-default 1 3% - read-from-minibuffer 1 3% redisplay_internal (C function) 0 0% ... This does fewer GCs (about 75% of what I see with bug-reference-mode turned ON), but not by a large factor. Looking at bug-reference-fontify, I see that it conses a string -- but it only does that when it finds a match for bug-reference-bug-regexp, and there are no such matches in igc.org on the branch, AFAICT. So I'm not sure which part(s) of bug-reference.el make a lot of garbage, or why. Ihor, any ideas?