all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>,
	"Ihor Radchenko" <yantar92@posteo.net>
Cc: 70796@debbugs.gnu.org
Subject: bug#70796: 30.0.50; bug-reference-mode leading to constant GCing
Date: Mon, 06 May 2024 17:03:22 +0300	[thread overview]
Message-ID: <86msp3avh1.fsf@gnu.org> (raw)
In-Reply-To: <m28r0nunhd.fsf@pro2.fritz.box> (message from Gerd Möllmann on Mon, 06 May 2024 14:35:42 +0200)

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: 70796@debbugs.gnu.org
> Date: Mon, 06 May 2024 14:35:42 +0200
> 
> Eli Zaretskii <eliz@gnu.org> 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?





  reply	other threads:[~2024-05-06 14:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06  6:53 bug#70796: 30.0.50; bug-reference-mode leading to constant GCing Gerd Möllmann
2024-05-06 11:48 ` Eli Zaretskii
2024-05-06 12:35   ` Gerd Möllmann
2024-05-06 14:03     ` Eli Zaretskii [this message]
2024-05-06 14:09       ` Gerd Möllmann
2024-05-07  6:58         ` Gerd Möllmann
2024-05-18  6:27           ` Gerd Möllmann
2024-05-18  8:07             ` Eli Zaretskii
2024-05-18 15:49               ` Tassilo Horn
2024-05-24 20:00               ` Tassilo Horn
2024-05-24 20:19                 ` Gerd Möllmann
2024-05-24 20:28                   ` Ihor Radchenko
2024-05-25  4:08                     ` Gerd Möllmann
2024-05-24 21:34                   ` Tassilo Horn
2024-05-25  4:34                     ` Gerd Möllmann
2024-05-25  7:37                       ` Tassilo Horn
2024-05-25  7:58                         ` Gerd Möllmann
2024-05-25  8:17                           ` Tassilo Horn
2024-06-01  9:05                             ` Gerd Möllmann
2024-06-15  7:54                               ` Eli Zaretskii
2024-06-15  8:07                                 ` Gerd Möllmann
2024-06-16  9:45                                   ` Tassilo Horn
2024-06-16 10:44                                     ` Eli Zaretskii
2024-06-17  7:34                                       ` Andrea Corallo
2024-06-17  8:07                                         ` Andrea Corallo
2024-06-17  8:19                                           ` Tassilo Horn
2024-06-17  8:30                                             ` Andrea Corallo
2024-06-17  9:02                                               ` Gerd Möllmann
2024-06-17  9:30                                                 ` Andrea Corallo
2024-06-17  9:53                                                   ` Gerd Möllmann
2024-06-17 10:10                                                     ` Andrea Corallo
2024-06-17 10:33                                                       ` Gerd Möllmann
2024-06-17 14:13                                                         ` Andrea Corallo
2024-06-17  8:21                                           ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86msp3avh1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70796@debbugs.gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.