unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 40704@debbugs.gnu.org, Eric Abrahamsen <eric@ericabrahamsen.net>
Subject: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
Date: Sun, 19 Jul 2020 16:52:29 +0200	[thread overview]
Message-ID: <87k0yzd0b6.fsf@web.de> (raw)
In-Reply-To: <87o8ocuu50.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 04:16:11 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:


> > +         (princ "#s(hash-table size ")
> > +         (prin1 (hash-table-size thing))
> > +         (princ " test ")
> > +         (prin1 (hash-table-test thing))
> > +         (princ " weakness ")
> > +         (prin1 (hash-table-weakness thing))
> > +         (princ " rehash-size ")
>
> etc
>
> So if the other printer changes, then this has to change, too?  That
> seems kinda brittle -- there should at least be references between the
> two printers with a note to keep them updated if one of them changes.

What do you mean, "other printer"?  The Lisp printer?

This read syntax is officially described in the Elisp manual:

  (info "(elisp) Creating Hash")

(near the end of the page), so I would expect that the syntax will be
supported in the future.

> > diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
> > index 480ed80ef8..4ac3c84a80 100644
> > --- a/lisp/gnus/gnus-registry.el
> > +++ b/lisp/gnus/gnus-registry.el
> > @@ -398,6 +398,7 @@ gnus-registry-save
> >    (interactive)
> >    (let* ((file (or file gnus-registry-cache-file))
> >           (db (or db gnus-registry-db))
> > +         (gc-cons-threshold (max gc-cons-threshold (* 800000 500)))
> >  	 (clone (clone db)))
> >      (gnus-message 5 "Saving Gnus registry (%d entries) to %s..."
> >                    (registry-size db) file)
>
> Could this have adverse consequences for people with low memory?

These are 400 MB... Could be?  Dunno.  I wonder, though, if when you
would hit that limit when that code runs, your computer can hold that
huge hash-table at all.  I don't know the relation between hash-table
size and corresponding amount of garbage.  But I guess if you are low on
memory using the registry is problematic per se.

Michael.





  reply	other threads:[~2020-07-19 14:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19  2:14 bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving Michael Heerdegen
2020-04-20  4:13 ` Eric Abrahamsen
2020-04-20 23:26   ` Michael Heerdegen
2020-04-21  3:42     ` Eric Abrahamsen
2020-04-23  1:32       ` Michael Heerdegen
2020-04-23  2:36         ` Eric Abrahamsen
2020-04-29 16:11           ` Eric Abrahamsen
2020-07-19  2:16 ` Lars Ingebrigtsen
2020-07-19 14:52   ` Michael Heerdegen [this message]
2020-07-19 14:58     ` Lars Ingebrigtsen
2020-07-19 15:19       ` Michael Heerdegen
2020-07-19 15:22         ` Lars Ingebrigtsen
2020-07-19 15:23     ` Michael Heerdegen
2020-07-19 15:32       ` Lars Ingebrigtsen
2020-10-01 18:22 ` Lars Ingebrigtsen
2020-10-01 23:53   ` Michael Heerdegen
2020-10-02  1:38     ` Lars Ingebrigtsen
2022-04-17 15:21 ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87k0yzd0b6.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=40704@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    --cc=larsi@gnus.org \
    /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 public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).