From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: hobbes@poukram.net (Rémi Letot)
Cc: ding@gnus.org
Subject: Re: gnus registry takes 21 seconds to save and I can't prune it
Date: Wed, 18 Mar 2020 10:58:08 -0700 [thread overview]
Message-ID: <87wo7hy28f.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <8736a5stvd.fsf@lybrafox.be> (=?utf-8?Q?=22R=C3=A9mi?= Letot"'s message of "Wed, 18 Mar 2020 13:57:42 +0100")
hobbes@poukram.net (Rémi Letot) writes:
> Hello,
>
> I have noticed quite a few slowdowns in my emacs for some times, but it
> never became annoying enough for me to investigate.
>
> Until now :-)
>
> Starting emacs, gnus, or quitting them has become annoyingly long. It is
> not really problematic because I leave emacs/gnus on for weeks at a
> time, but still. Besides, pressing s in the group buffer is far too long
> to be comfortable.
>
> So, I diagnosed it to gnus-registry-save taking 21 seconds.
>
> I tried to see what happens in there, and noticed that I could set
> gnus-registry-max-entries to a sensible number, but then I get an error
> whenever I try to prune the registry (meaning as soon as I try to do
> anything in gnus).
>
> The error is "cl-some: Wrong type argument: listp, quote".
Slow saving is a separate issue, and one that annoys a lot of people,
but this error sounds a lot like something that was going on a year or
more ago. If it's the same thing, there ought to be a solution:
1. Shut down Gnus
2. Back up your registry file
3. Start Gnus again
4. Eval the code below
5. Run M-x gnus-registry-fixit
6. Save Gnus
With any luck that will resolve the error.
(defun gnus-registry-strip-quotes (lst)
(let (acc)
(when (consp lst)
(while (eq (car lst) 'quote)
(setq lst (cadr lst)))
(while (consp lst)
(if (eq (car lst) 'quote)
(setq lst (cadr lst))
(push (gnus-registry-strip-quotes (car lst)) acc)
(setq lst (cdr lst)))))
(nconc (nreverse (delete-dups acc))
lst)))
(defun gnus-registry-fixit ()
"Fix Gnus registry after eieio-persistent patches.
For use with Emacs master branch, after installing 0afb43eeb, or
the 26 branch, after daa9e853bd."
(interactive)
(unless (gnus-alive-p)
(gnus))
(when gnus-registry-enabled
(with-slots (tracker data) gnus-registry-db
(maphash
(lambda (track-sym hsh)
(maphash
(lambda (k v)
(setf (gethash k hsh)
(gnus-registry-strip-quotes v)))
hsh))
tracker)
(maphash
(lambda (k v)
(setf (gethash k data) (gnus-registry-strip-quotes v)))
data))))
next prev parent reply other threads:[~2020-03-18 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 12:57 Rémi Letot
2020-03-18 16:04 ` Eric S Fraga
2020-03-18 17:58 ` Eric Abrahamsen [this message]
2020-03-18 22:24 ` Bob Newell
2020-03-18 23:17 ` Eric Abrahamsen
2020-03-19 17:39 ` hobbes
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=87wo7hy28f.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=ding@gnus.org \
--cc=hobbes@poukram.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).