GNU bug report logs - #40704
28.0.50; Improve and speed up (Gnus) registry saving

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Sun, 19 Apr 2020 02:15:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 1 Oct 2020 18:23:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 01 14:23:12 2020
Received: from localhost ([127.0.0.1]:38266 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kO3EW-0005TK-AN
	for submit <at> debbugs.gnu.org; Thu, 01 Oct 2020 14:23:12 -0400
Received: from quimby.gnus.org ([95.216.78.240]:33924)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kO3EU-0005T5-47
 for 40704 <at> debbugs.gnu.org; Thu, 01 Oct 2020 14:23:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=AHnLRTWCV5IwwLa4TubGKCfCP6e0PWD4MJii2XkNHwY=; b=Lpa4j7u0Eyh24K9qPAUFAuPsCd
 ER80wg+FmJ3+rZpi/hrrnL/+NkFAo2+073PxCfKrZ/4zu5KUal7R/6broM7Rh31x31UNQMLTf2PZT
 sam2LJDQkwa3GtqY+PB7xiJpoM5imK7gOy2zBG/uawy5enLww2eU2VJpokSLYe9BwA+w=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kO3EL-0001bP-4a; Thu, 01 Oct 2020 20:23:03 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN>
X-Now-Playing: Nanang Tatang's _Muki_: "Booster Shot"
Date: Thu, 01 Oct 2020 20:22:59 +0200
In-Reply-To: <87a738ql1z.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Apr 2020 04:14:00 +0200")
Message-ID: <87sgax3iws.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > (3)
 I also decided to change `eieio-override-prin1' to print hash tables > "by
 hand" from Lisp. The eieio-persistent requires to modify how > elements in
 the hash tables are printed, and the current [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> (3) I also decided to change `eieio-override-prin1' to print hash tables
> "by hand" from Lisp.  The eieio-persistent requires to modify how
> elements in the hash tables are printed, and the current way of doing
> this (make a copy of the complete table, change the elements, prin1 and
> re-read the result) is not only hackish but also inefficient (it does
> this recursively for nested tables).

[...]

> +         (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 ")
> +         (prin1 (hash-table-rehash-size thing))
> +         (princ " rehash-threshold ")
> +         (prin1 (hash-table-rehash-threshold thing))
> +         (princ " data (")

I'm still not enthusiastic about duplicating the hash printing here.
Whenever print_vectorlike changes, this has to be changed, too.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 15:32:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 11:32:56 2020
Received: from localhost ([127.0.0.1]:32795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jxBJ9-0003Qe-PT
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:32:56 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1jxBJ8-0003QR-Ej
 for 40704 <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:32:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bNibCiDl/Vm5wZgTST0mw49KJoLYse/erZxjtfe2Bnk=; b=ZSlVEIsf9Y9OYYBlzMzRduoyWo
 M7vuR/7ORolHkYOz9C6CG3Dk1OpQp80683Jt4e+aS9Vj2XoWdNMCtoX8AZ+0m90sm/w6OwQfMRotm
 Avyv9fUyWHzEhmmwkWc+4VT2PRlAQMziYTXfm2R1tRERkdq7KyAdTs8xlZe5O5pAPMuI=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1jxBJ0-0007LC-78; Sun, 19 Jul 2020 17:32:48 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87o8ocuu50.fsf@HIDDEN>
 <87k0yzd0b6.fsf@HIDDEN> <87blkbcyv9.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 17:32:44 +0200
In-Reply-To: <87blkbcyv9.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Jul 2020 17:23:38 +0200")
Message-ID: <87wo2zo6zn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Michael Heerdegen <michael_heerdegen@HIDDEN> writes: >
 Michael
 Heerdegen <michael_heerdegen@HIDDEN> writes: > >> > > + (gc-cons-threshold
 (max gc-cons-threshold (* 800000 500))) >
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 > Maybe it would be wise to factor [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
>> > > +         (gc-cons-threshold (max gc-cons-threshold (* 800000 500)))
>                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Maybe it would be wise to factor this out into a defvar so that it's in
> reach of users.  The value could be a function whose return value could
> also depend on the actual size of the registry.

Sure; that sounds good.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 15:23:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 11:23:58 2020
Received: from localhost ([127.0.0.1]:32780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jxBAU-00012y-DQ
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:23:58 -0400
Received: from mout.web.de ([212.227.17.12]:44525)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jxBAS-00012l-K3
 for 40704 <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:23:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1595172220;
 bh=dBIQcGW0GUln5W1uSxDanpqL3dSonmWuWMm1ycBtg/E=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=e4mKggmoA77n5ebvsesWHeuKjt6Di1kHs82sxVPHCxKoaAt476P8DGW3A/1lOBTd1
 E8/zXFIK6AQ2kbUi4iKLjwcl5BdhFuy8jctqSrUX+QXWwDrql4qtLQ62j5M1WhLrWd
 5IWg8KznzWHJGWAPsh6SvMypRN8hT7ZW6ffGo8rA=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([92.208.183.182]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MS17h-1kQVZn0Vat-00TLEU; Sun, 19
 Jul 2020 17:23:40 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87o8ocuu50.fsf@HIDDEN>
 <87k0yzd0b6.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 17:23:38 +0200
In-Reply-To: <87k0yzd0b6.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Jul 2020 16:52:29 +0200")
Message-ID: <87blkbcyv9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:v3H+aBbFWYV+JlxH7PktdUJC3k1ubKAbNyxxd0L8iPj5SxJUP8r
 cSI4F/yuA624iT4tlqAXoLZdTNe1WQek16iBVpWcUBUEiyHbYfE9Mav3Ri40pv/HFyOnCkb
 JRycNInma6APE52Og/epT2lXq9rPzx5WwFn6l22Wzl95XOXo5YENIXHK+jE1ICOv9XkxzZ6
 IeIiZuDv4Uvx7SXoz3tiw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:en8rTiFRy3M=:Tfd3TrbtfMn5VAxzWAwQk+
 oK2W9eKEInR4lthHJ/wcv2kMzI54qeAlaWpPq4t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9Hbo1gZp
 06ay465earE2FxEz0c5JfW6EeR8MnSU79ZGkprk+pDIDyX8UqPc0EBRbkYueQIkg7bEZEMBqI
 0iEWESoc1LAjWWrJ6zXTn0c6bUcRmKnSgXlwgir/nXlvD1+akZow0VO+tzUZlwUn4WjP+U3MB
 bJ9iEmnueQW6uO5QSm9mC+teF2LUnWGnMBqFHSw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:


> > > +         (gc-cons-threshold (max gc-cons-threshold (* 800000 500)))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Maybe it would be wise to factor this out into a defvar so that it's in
reach of users.  The value could be a function whose return value could
also depend on the actual size of the registry.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 15:22:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 11:22:20 2020
Received: from localhost ([127.0.0.1]:32776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jxB8u-00010V-0d
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:22:20 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34694)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1jxB8s-00010I-9z
 for 40704 <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:22:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=/wdix167tcciN4WqxTyIbkNMOCEyr7QgK+ZehinkZiw=; b=TXzaXGpj97X7V9ljLx+O/0Uq3C
 jFuZAZ6HK4l/0ssx3hBIXLeIce1fVGxkCI3sZ7EBrfUq1JCPUMdUbN5Ar6uc7TNm5ZYMiw5Wg16kS
 yCTwTPhJOg9SCMmr4YGJeNHdpof2BIZ67oVKXBmPTX+AySldX6BMLY6wlUmrVNnBOESo=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1jxB8j-0007Fw-TA; Sun, 19 Jul 2020 17:22:12 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87o8ocuu50.fsf@HIDDEN>
 <87k0yzd0b6.fsf@HIDDEN> <87imejpn58.fsf@HIDDEN>
 <87ft9ncz1y.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 17:22:08 +0200
In-Reply-To: <87ft9ncz1y.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Jul 2020 17:19:37 +0200")
Message-ID: <877duzpm1r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > Lars
 Ingebrigtsen <larsi@HIDDEN> writes: > >> Presumably there's already code
 to print a hash table somewhere in >> Emacs? That would be the other printer, 
 since your patch adds a new >> one. > > [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Lars Ingebrigtsen <larsi@HIDDEN> writes:
>
>> Presumably there's already code to print a hash table somewhere in
>> Emacs?  That would be the other printer, since your patch adds a new
>> one.
>
> That's what the code currently already does.  But: See what I wrote
> about the purpose of the patch: our saving code needs to modify how
> elements in the hash table are printed.  The Lisp printer doesn't allow
> that per se.  My suggested patch substitutes a very inefficient hack
> with a more efficient hack.  The current code uses printing + re-reading
> AFAIR - and that on nested hash tables.
>
> I thought long about removing the need for this hack altogehter, but
> this is very complicated, if not impossible (yes, you would need to
> change the printer).

I didn't object to this new, more efficient printer -- I just pointed
out that you should add comments to both of the hash table printers that
there are (now) two of them.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 15:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 11:19:49 2020
Received: from localhost ([127.0.0.1]:60996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jxB6T-0000vD-5F
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:19:49 -0400
Received: from mout.web.de ([217.72.192.78]:51065)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jxB6S-0000v1-4l
 for 40704 <at> debbugs.gnu.org; Sun, 19 Jul 2020 11:19:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1595171979;
 bh=kDnTnFZwPTGX4FuZ91UpPpgFapCkFGER3bmKFVeMup4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=lVOf+o/i9JGu3mgCgroqnGbYyTrMKw2uqGve3quVNB9xpggHnm+zyXtf6kXVS6ou7
 rYJ6kVUYwBTYgiYtbR2zeq78xZBnxIr0ZfiE5PK9bJdUd5XzbdLSxy74XLGmC0GgAe
 vgGkEU5daX8lbmbn5ayJRPfvF50WslA7xvh79mgc=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([92.208.183.182]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MGQC7-1k2wPH37sb-00GpD5; Sun, 19
 Jul 2020 17:19:38 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87o8ocuu50.fsf@HIDDEN>
 <87k0yzd0b6.fsf@HIDDEN> <87imejpn58.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 17:19:37 +0200
In-Reply-To: <87imejpn58.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 19 Jul 2020 16:58:27 +0200")
Message-ID: <87ft9ncz1y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:NJPFv+/KwDBEuIAc0ZLBCSOcNLENa9R1cOY8Ni8gpFOURPauWSC
 w9LgT6bRAPRYjDq34n42iMstaR4MTN0XO8OZ18eyLN6iVJXnFFR2OzJqQQAf4fMq1tyo0bG
 TZN1fJIk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nnj9Xkf
 35mEVdv57fWqocREZrdr6/rF7Xwfl0wj8RTXhttLn9bKtqN+F+H3gvp+zvcJFMXx0dLlP3XyG
 W47qTRu3mWM80Ymdpytc64Hhnzlplqrv8K+U6J4jYJYkVVu+NXswoQydtb2LLLDzmIKnnHtfS
 Bu8Y1N1v0tFNpRLvyMencdJu8hGmXZ7QGRCvANzZRP4L3kivl9QTPYsrylkg3jPo2akNsWkoR
 78VE/HFoSKeMF3ICidbrjITyt1h2BZrWamugs/OrGJJGr0PPoA+8gOoi36yKCxs8hTSgmYgJ8
 p8BGeXCKIxFxslsUdPSe2o2duK9/LUwW/ekmaJepHcO8QnCiG6F4dGSjm1SNV2UGLOmTTq2VK
 PTaHaI1BJZzez0YriwEuxa102KYfOFxwap6y6QQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Presumably there's already code to print a hash table somewhere in
> Emacs?  That would be the other printer, since your patch adds a new
> one.

That's what the code currently already does.  But: See what I wrote
about the purpose of the patch: our saving code needs to modify how
elements in the hash table are printed.  The Lisp printer doesn't allow
that per se.  My suggested patch substitutes a very inefficient hack
with a more efficient hack.  The current code uses printing + re-reading
AFAIR - and that on nested hash tables.

I thought long about removing the need for this hack altogehter, but
this is very complicated, if not impossible (yes, you would need to
change the printer).

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 14:58:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 10:58:41 2020
Received: from localhost ([127.0.0.1]:60991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jxAlx-0000Ph-UR
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2020 10:58:41 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34468)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1jxAlw-0000PT-NF
 for 40704 <at> debbugs.gnu.org; Sun, 19 Jul 2020 10:58:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=OUtdj8gG1cUOIwcfsnzGKxHysX9zjbfOl5R3BTbW334=; b=DyvBhqio4etWXMFKoMNKIbvUgf
 jqompgX4lqnQdttD2kiCGKl+CCVQA/v5fQEn5RNJUOC+Kk59+QQgUtSNCrvDUqB4fyM0vrDJmEFYx
 jzU35PkeaojsT3brrMYqYoVUCB8AMeZKoaB9ECYWFzHPADK3s+8f8mPTLD+KAX4u+IW4=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1jxAlo-00075p-9Z; Sun, 19 Jul 2020 16:58:30 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87o8ocuu50.fsf@HIDDEN>
 <87k0yzd0b6.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 16:58:27 +0200
In-Reply-To: <87k0yzd0b6.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Jul 2020 16:52:29 +0200")
Message-ID: <87imejpn58.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: >> 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 [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

>> 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.

Presumably there's already code to print a hash table somewhere in
Emacs?  That would be the other printer, since your patch adds a new one.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 14:52:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 10:52:51 2020
Received: from localhost ([127.0.0.1]:60983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jxAgM-0000Gk-UV
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2020 10:52:51 -0400
Received: from mout.web.de ([217.72.192.78]:50949)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jxAgI-0000GT-QI
 for 40704 <at> debbugs.gnu.org; Sun, 19 Jul 2020 10:52:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1595170350;
 bh=QB6whjVL+iGDbwZgl1WcY9roh4NbbPpp0DWKtBXy1dQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=fZehNvDaYeRjV35Z+FZIzK6X+c3UwJ2FB2nhCBfWbIyjQ7U0EplRmWaGZXYHrJ5C1
 oVpwBQJdbQh/FHAqBdrUaNahLyM1MUyfYgm53CYbizNpZyImqkXrO4sFTlZD/77BeD
 ABm1rkW4xICakyvMnWd5cWoNvbjn05pOauEcI4sQ=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([92.208.183.182]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MHY5w-1jyG4Q0i9k-003QBz; Sun, 19
 Jul 2020 16:52:30 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87o8ocuu50.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 16:52:29 +0200
In-Reply-To: <87o8ocuu50.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 19 Jul 2020 04:16:11 +0200")
Message-ID: <87k0yzd0b6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:DxLsEV92YZaOsu2mdIeF7wdJIKZycSKBfZEA/jS0AUHfTrwYH03
 BwU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123TDm3IgeqkIaLKv/sjs6GHZmCZOO8ozPjtSARvsTxJJSgY3dE5WVm66j1RF
 MXtaigSdD6xcipxwNlNTO9IGNsr1UaZlKohyZnrzTDFUYyUjBUu4WbQ01noDPiwjvD02zOYbG
 SL0qr7k6+ERnO3seCbT7hOc2gTFNrvgGmA0R9MLXY7jJOnoju9j1RS6mng248mQzDKs5Oj6XU
 LHkGFw3oavWdAy91tstkqRFgisH8QUDE+6gDSrJ1TAWCGRZs4zLgZoKXz56n+PU/MsZJ2gQPe
 cKYgBJqkR923CoWGm07Y3LaSxk0dFJo93AVFerqUTuoy7Xj+2tRKtd7RWnyXVrF2YjqPeHEkc
 NmPnMi+kqo7PVISIuh4/jVOh3sHB7sBbfbmzb9Ts0zmDdZ4xuTUdlJT0QxFtVKl3/dGRxu+Fa
 yeJSPysG+2KF+p0qbu8skRRK3f1xWR2gw3zIt0w==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Lars Ingebrigtsen <larsi@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 19 Jul 2020 02:16:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 18 22:16:26 2020
Received: from localhost ([127.0.0.1]:59720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jwysM-0000FS-18
	for submit <at> debbugs.gnu.org; Sat, 18 Jul 2020 22:16:26 -0400
Received: from quimby.gnus.org ([95.216.78.240]:56392)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1jwysJ-0000FC-Uu
 for 40704 <at> debbugs.gnu.org; Sat, 18 Jul 2020 22:16:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=JyepkZrZNqTuInXtesdneyMTkzBDlpTiNcSPy9GNN/Q=; b=boZ7v9mm7882yJflGqz7/LPssk
 O2bJL3rXxHjsTmnPMhopRXh5zfs/hZoHKjRblEUBIElBTqHPxs2ws6mffvslypMM5AsUsGyi8J+NA
 38HBmAsQPjPRQ2378reHDrakNdG6QZjkF2W9bN//ciliVhc5abK1yjhFiujihCCog/10=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1jwys8-00083J-MG; Sun, 19 Jul 2020 04:16:17 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN>
Date: Sun, 19 Jul 2020 04:16:11 +0200
In-Reply-To: <87a738ql1z.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Apr 2020 04:14:00 +0200")
Message-ID: <87o8ocuu50.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: > (3)
 I also decided to change `eieio-override-prin1' to print hash tables > "by
 hand" from Lisp. The eieio-persistent requires to modify how > elements in
 the hash tables are printed, and the current [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org, Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> (3) I also decided to change `eieio-override-prin1' to print hash tables
> "by hand" from Lisp.  The eieio-persistent requires to modify how
> elements in the hash tables are printed, and the current way of doing
> this (make a copy of the complete table, change the elements, prin1 and
> re-read the result) is not only hackish but also inefficient (it does
> this recursively for nested tables).

Yeah, the current implementation seems maximally inefficient...  But I
guess this copies functionality found elsewhere?

> +         (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.

> 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?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 29 Apr 2020 16:11:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 12:11:30 2020
Received: from localhost ([127.0.0.1]:44403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTpJ4-00048z-A1
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2020 12:11:30 -0400
Received: from ericabrahamsen.net ([52.70.2.18]:52232
 helo=mail.ericabrahamsen.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1jTpJ2-00048f-14
 for 40704 <at> debbugs.gnu.org; Wed, 29 Apr 2020 12:11:29 -0400
Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 11F6BFA16B;
 Wed, 29 Apr 2020 16:11:20 +0000 (UTC)
From: Eric Abrahamsen <eric@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87pnc2lrpi.fsf@HIDDEN>
 <87lfmpkac0.fsf@HIDDEN> <87o8rl33oi.fsf@HIDDEN>
 <87o8rjvvf5.fsf@HIDDEN> <87368vapxy.fsf@HIDDEN>
Date: Wed, 29 Apr 2020 09:11:03 -0700
In-Reply-To: <87368vapxy.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Wed, 22 Apr 2020 19:36:25 -0700")
Message-ID: <87368me0h4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eric Abrahamsen <eric@HIDDEN> writes:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
>> Eric Abrahamsen <eric@HIDDEN> writes:
>>
>>> > -- who has experience with this problem -- anybody?
>>
>> Maybe the scaling idea is not a good idea at all.  Even when it works as
>> we hope - the ideal factor could still depend on what kind of data is
>> saved.
>>
>>> Not me, let's hope for more respondents...
>>
>> Did you try how the increased gc-limit behaves for you btw?  Then we
>> would at least have two data points.
>
> I applied the patch a couple of days ago and have been very pleased with
> the speedup! Nothing "bad" has happened, but I haven't tried
> experimenting with different gc limits, either.

Hey let's at least stick in the modification-hook and hash-table
improvements now, there are Gnus users out there still waiting for their
registry to save! It helps noticeably with EBDB, too.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 23 Apr 2020 02:36:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 22 22:36:38 2020
Received: from localhost ([127.0.0.1]:53728 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jRRjB-0008MF-9I
	for submit <at> debbugs.gnu.org; Wed, 22 Apr 2020 22:36:38 -0400
Received: from ericabrahamsen.net ([52.70.2.18]:47626
 helo=mail.ericabrahamsen.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1jRRj8-0008M0-9m
 for 40704 <at> debbugs.gnu.org; Wed, 22 Apr 2020 22:36:35 -0400
Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 91391FA099;
 Thu, 23 Apr 2020 02:36:27 +0000 (UTC)
From: Eric Abrahamsen <eric@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87pnc2lrpi.fsf@HIDDEN>
 <87lfmpkac0.fsf@HIDDEN> <87o8rl33oi.fsf@HIDDEN>
 <87o8rjvvf5.fsf@HIDDEN>
Date: Wed, 22 Apr 2020 19:36:25 -0700
In-Reply-To: <87o8rjvvf5.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 23
 Apr 2020 03:32:30 +0200")
Message-ID: <87368vapxy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Eric Abrahamsen <eric@HIDDEN> writes:
>
>> > -- who has experience with this problem -- anybody?
>
> Maybe the scaling idea is not a good idea at all.  Even when it works as
> we hope - the ideal factor could still depend on what kind of data is
> saved.
>
>> Not me, let's hope for more respondents...
>
> Did you try how the increased gc-limit behaves for you btw?  Then we
> would at least have two data points.

I applied the patch a couple of days ago and have been very pleased with
the speedup! Nothing "bad" has happened, but I haven't tried
experimenting with different gc limits, either.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 23 Apr 2020 01:32:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 22 21:32:46 2020
Received: from localhost ([127.0.0.1]:53688 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jRQjO-0006ll-G7
	for submit <at> debbugs.gnu.org; Wed, 22 Apr 2020 21:32:46 -0400
Received: from mout.web.de ([212.227.15.14]:42737)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jRQjN-0006lW-3m
 for 40704 <at> debbugs.gnu.org; Wed, 22 Apr 2020 21:32:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1587605548;
 bh=60KjwY2549yoRetZE3FIDUYYRNgcT8aRTxekh6KwRls=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=gw7oNtp3Hj/d9Pl9tuOtHOqS7QNnjMIMZm50QGD84WpqdFmpHTGtld7P4knxZMCHz
 2cmJ0k9Mnpy0j0alAPxyqQ402f6/gC4umBB4BAHPWvpK3HH9i4Ay+bG7F2q5DxWuHx
 aMTA1bXOdmv5MhCOJwDsFFkGgNsqlv6tnoxJF/Nw=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([188.98.99.7]) by smtp.web.de (mrweb004
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LuqfJ-1j14Gr2NZR-0104BL; Thu, 23
 Apr 2020 03:32:28 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87pnc2lrpi.fsf@HIDDEN>
 <87lfmpkac0.fsf@HIDDEN> <87o8rl33oi.fsf@HIDDEN>
Date: Thu, 23 Apr 2020 03:32:30 +0200
In-Reply-To: <87o8rl33oi.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Mon, 20 Apr 2020 20:42:21 -0700")
Message-ID: <87o8rjvvf5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5mhOwN857kkQUeXDR1VdfkSIv4CgL/zgUKJVgosv9GIDtLsFbya
 eRHICgTFcPDedvn3hwXliVFeHrzGpBdAtaUSDrWMRWA+B3mTYcuuCPezwuhUxAi0XucZDHI
 3LWwa+h37SoXK17KYRLCm2IBQN2PTLFcjmQqwIL1POsTgiP0zp3l3GdOBwW0kJaDB4T9QSx
 ooXqaLmBphd+JwGwPTRww==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:1/jUfW17mLw=:EUG6NQE34mH7iRrVd3Biu7
 PvmOg+3ZEXZ6Ma4Kf1rdoE7TmxvccUe5J0721iWCsz44EQjbo24DbQDnuURuxVjxuz4/HrlQq
 kYcYmLqA9olXtR+1MwKJJNUAxJ/dkkbceoMYXkP2PS1JlGPXgAUxR+k3fsJsqfbQubXNFBrV9
 b0JYVzYGKrVYYrDoKILJycAMvtgliXfjDyTFSrRdKxTZv+Hg13cRQcCooSOHaN0AI8V+bozxg
 KXVWm2YEex0y+G+n3e7TXAXwc0GKbc3ciR2y8/jQkIuCFZYo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debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eric Abrahamsen <eric@HIDDEN> writes:

> > -- who has experience with this problem -- anybody?

Maybe the scaling idea is not a good idea at all.  Even when it works as
we hope - the ideal factor could still depend on what kind of data is
saved.

> Not me, let's hope for more respondents...

Did you try how the increased gc-limit behaves for you btw?  Then we
would at least have two data points.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 21 Apr 2020 03:42:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 20 23:42:32 2020
Received: from localhost ([127.0.0.1]:48814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQjns-0007rN-JN
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 23:42:32 -0400
Received: from ericabrahamsen.net ([52.70.2.18]:48696
 helo=mail.ericabrahamsen.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1jQjnq-0007r9-K8
 for 40704 <at> debbugs.gnu.org; Mon, 20 Apr 2020 23:42:30 -0400
Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 6E72EFA02A;
 Tue, 21 Apr 2020 03:42:23 +0000 (UTC)
From: Eric Abrahamsen <eric@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87pnc2lrpi.fsf@HIDDEN>
 <87lfmpkac0.fsf@HIDDEN>
Date: Mon, 20 Apr 2020 20:42:21 -0700
In-Reply-To: <87lfmpkac0.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 21
 Apr 2020 01:26:39 +0200")
Message-ID: <87o8rl33oi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Eric Abrahamsen <eric@HIDDEN> writes:
>
>> > Any comments on the suggested changes?
>>
>> Not that it's up to me,
>
> I wonder who it's up to...

There's sort of a `with-gnus-bug-report' macro that we're working with
here, where if Lars (or in this case, Ted Zlatanov) doesn't respond
within a certain period of time, the commit automatically goes in.

>> but I'm all for putting in #1 and #3 as-is, and adjusting #2 to scale
>> with the number of `gnus-registry-max-entries', with the addition of a
>> hard ceiling.
>
> Too large values of `gnus-registry-max-entries' can be harmful
> (fragmentation of memory?), I wonder if this can potentially be the case
> here.

Well that's where the hard ceiling comes in, right?

> I'm also not sure if scaling is a good idea at all.  The value I chose
> will still make gc happen much less frequently even if your registry is
> huge.  So it's still a win.  If your value is too large, the final
> cleanup may take longer as necessary -- who has experience with this
> problem -- anybody?

Not me, let's hope for more respondents...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 20 Apr 2020 23:26:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 20 19:26:54 2020
Received: from localhost ([127.0.0.1]:48647 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQfoU-0001Zs-EI
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 19:26:54 -0400
Received: from mout.web.de ([212.227.17.11]:41993)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jQfoS-0001Zf-LG
 for 40704 <at> debbugs.gnu.org; Mon, 20 Apr 2020 19:26:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1587425197;
 bh=0QCYR7O69QmhzMfpJcl1bMsQP6AeVIaJejQwaJiBMrU=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Gef+F4dTYADY1VWhSoPZQWXk29y7qWiJWJsllhma22JB+xchCxhjmknFhJU0YSNd3
 OWnpVabUZ0gPTJadhw38DRX2evNyd+XnB7AAm22YKNzaIB0Bn/ghd102j6/SBnI/Rc
 2eiWOEwTB+OBMY14tGhnwcrZhBrAFI4PsLYAOPds=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([188.98.99.7]) by smtp.web.de (mrweb101
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MTPn1-1jpivq1Y7r-00SLvU; Tue, 21
 Apr 2020 01:26:37 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN> <87pnc2lrpi.fsf@HIDDEN>
Date: Tue, 21 Apr 2020 01:26:39 +0200
In-Reply-To: <87pnc2lrpi.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Sun, 19 Apr 2020 21:13:45 -0700")
Message-ID: <87lfmpkac0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:t89YeEDARZ0Sgtk+ST2kZC618TMfYTG+BrzNyv2OHecKf/7oPOw
 arkqyZGiaEDLSi4k2p7+9m6jFpfMWzYvYGOuh1X0I5UHnidElAFzozfx55XwR5qmV/dRGdU
 kGdtmjBFz3X+e65xK42EmRiNcX/Nen8CHa2ghzbJIheGAR740yMxJkdn5QC0Zzch2hr1OnX
 fVReOwa2XTW3z7r/FBACQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:zEQ4jdF+ysc=:G4rSWiqLSczMop5KwOU8rJ
 kIuZFKH4a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Re9BVOe0AUZdiW7Y/Jr48XvT7wsBk8PjL+1OowU
 pdI4kqt1qzEonLQ5Hj/p5MQyGUDyinmcBCWXW2PyWP6UmY0ss04J7au8ng8IyrqSINJHJP18w
 TUsVH7K3G8l3md46ueSHyNprRvwIKy5PE5pVtYd5EScg15qmN1a3YVNTU9HKi4m1/N3B5kZOv
 k+S9avFjudjfdnJAu
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eric Abrahamsen <eric@HIDDEN> writes:

> > Any comments on the suggested changes?
>
> Not that it's up to me,

I wonder who it's up to...

> but I'm all for putting in #1 and #3 as-is, and adjusting #2 to scale
> with the number of `gnus-registry-max-entries', with the addition of a
> hard ceiling.

Too large values of `gnus-registry-max-entries' can be harmful
(fragmentation of memory?), I wonder if this can potentially be the case
here.

I'm also not sure if scaling is a good idea at all.  The value I chose
will still make gc happen much less frequently even if your registry is
huge.  So it's still a win.  If your value is too large, the final
cleanup may take longer as necessary -- who has experience with this
problem -- anybody?


Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at 40704 <at> debbugs.gnu.org:


Received: (at 40704) by debbugs.gnu.org; 20 Apr 2020 04:13:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 20 00:13:58 2020
Received: from localhost ([127.0.0.1]:46402 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQNok-0002CH-7n
	for submit <at> debbugs.gnu.org; Mon, 20 Apr 2020 00:13:58 -0400
Received: from ericabrahamsen.net ([52.70.2.18]:49010
 helo=mail.ericabrahamsen.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1jQNoh-0002C0-6w
 for 40704 <at> debbugs.gnu.org; Mon, 20 Apr 2020 00:13:56 -0400
Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id B6D67FA099;
 Mon, 20 Apr 2020 04:13:46 +0000 (UTC)
From: Eric Abrahamsen <eric@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#40704: 28.0.50; Improve and speed up (Gnus) registry saving
References: <87a738ql1z.fsf@HIDDEN>
Date: Sun, 19 Apr 2020 21:13:45 -0700
In-Reply-To: <87a738ql1z.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 19
 Apr 2020 04:14:00 +0200")
Message-ID: <87pnc2lrpi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40704
Cc: 40704 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Hello,
>
> Saving the Gnus registry is quite slow currently.  I profiled a bit and
> for now suggest to do something like in the attached patch.  In detail:
>
> (1) We need to bind inhibit-modification-hooks -> t, this offers a good
> speedup (~ 4 or so).
>
> (2) Printing the registry which basically consists of huge hash tables,
> causes a lot of garbage.  Most of that garbage seems to be unavoidable
> (is it created by the printing primitives?).  Anyway, seems we should
> temporarily increase `gc-cons-threshold' drastically, this offers
> another speedup of 25% or so.  The patch attached uses the value that
> works well for me and the size of my registry, and I bind it in
> `gnus-registry-save', because I assume other registries outside of Gnus
> can be smaller.  What would be a good value of `gc-cons-threshold', or
> should it even scale with `gnus-registry-max-entries' instead of being
> constant?
>
> (3) I also decided to change `eieio-override-prin1' to print hash tables
> "by hand" from Lisp.  The eieio-persistent requires to modify how
> elements in the hash tables are printed, and the current way of doing
> this (make a copy of the complete table, change the elements, prin1 and
> re-read the result) is not only hackish but also inefficient (it does
> this recursively for nested tables).
>
> Any comments on the suggested changes?

Not that it's up to me, but I'm all for putting in #1 and #3 as-is, and
adjusting #2 to scale with the number of `gnus-registry-max-entries',
with the addition of a hard ceiling.

Eric




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Apr 2020 02:14:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 18 22:14:15 2020
Received: from localhost ([127.0.0.1]:43850 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jPzTL-0003us-0h
	for submit <at> debbugs.gnu.org; Sat, 18 Apr 2020 22:14:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:38412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jPzTI-0003uk-Rw
 for submit <at> debbugs.gnu.org; Sat, 18 Apr 2020 22:14:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55168)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jPzTI-0003Mc-Do
 for bug-gnu-emacs@HIDDEN; Sat, 18 Apr 2020 22:14:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
 DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,
 RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable
 autolearn_force=no version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1jPzTH-0007Xp-Qg
 for bug-gnu-emacs@HIDDEN; Sat, 18 Apr 2020 22:14:12 -0400
Received: from mout.web.de ([212.227.17.12]:48197)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1jPzTH-0007Ua-4D
 for bug-gnu-emacs@HIDDEN; Sat, 18 Apr 2020 22:14:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1587262438;
 bh=UYC1btuYddzqCUQaJiaUTWKZOvqd6ClUEQWO0a3KGwQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:Date;
 b=d3K9FBNK7Y8tFBA88192VJXNQssxgKqMY+liaGR/QJjfyAZakntT0o+22Ix7CNkxU
 0jfF+zyagO4VeBOaaDxDkEPou+cHpXwrmVyeJEsDayB2VzwMc2NT/SwZOl4pWDEfIZ
 //gmJmu/vtKT4BkJ6ugZvt2f8exFDP8wnpodTys0=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([188.98.99.7]) by smtp.web.de (mrweb102
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MWj6V-1jizDp15IJ-00XujL; Sun, 19
 Apr 2020 04:13:58 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; Improve and speed up (Gnus) registry saving
Date: Sun, 19 Apr 2020 04:14:00 +0200
Message-ID: <87a738ql1z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:72DVJg2XPFw/iUlCC3EWSoOF714EPmOjXHGWnNMo8d74YjSJ9EF
 FizHwrVBdSf5qkoE6Odlk87bPSqLRMF7Xo/m5x/3k98sKOQlK1BUA/zNAAuZyqUwrZg768I
 djD8hDKYFXJtvvTFPiKQWu3B2sXllDFcaZh95iKy1nxafNgnAzoC5lK+hxjXAphQdWnDcgO
 W4hgXd43QamGmxgJHm01g==
X-UI-Out-Filterresults: notjunk:1;V03:K0:THVUBuAJCWU=:/LBRKf1j07638O7V+daMIu
 0RCS9ov8NMqXL+2TDgFpwkwrX2uES9oaaizJeZqh02z6dFmMRnFgM2Y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
 5sG85Xig67hHnFsPeo0Mq+TOX06N6zCYzNDZU6nsGYs3A9U1+EJoP/r/5IoALJcLFTARfvCun
 FrRUBxd3FP3iTQQFkTftavWiip6Fioq0AM+R+abqeDEt2YQYTDBpwkFSXMCcLDrdeeQpgYKgK
 CN1VZ13Ush3U4xb10
Received-SPF: pass client-ip=212.227.17.12;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-detected-operating-system: by eggs.gnu.org: Linux 2.2.x-3.x [generic]
X-Received-From: 212.227.17.12
X-Spam-Score: 2.2 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hello, Saving the Gnus registry is quite slow currently. I
 profiled a bit and for now suggest to do something like in the attached patch.
 In detail: (1) We need to bind inhibit-modification-hooks -> t, this offers
 a good speedup (~ 4 or so). 
 Content analysis details:   (2.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.9 SPF_FAIL               SPF: sender does not match SPF record (fail)
 [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;
 id=michael_heerdegen%40web.de; ip=209.51.188.17; r=debbugs.gnu.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [209.51.188.17 listed in list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (michael_heerdegen[at]web.de)
 2.0 SPOOFED_FREEMAIL       No description available.
X-Debbugs-Envelope-To: submit
Cc: Eric Abrahamsen <eric@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

--=-=-=
Content-Type: text/plain


Hello,

Saving the Gnus registry is quite slow currently.  I profiled a bit and
for now suggest to do something like in the attached patch.  In detail:

(1) We need to bind inhibit-modification-hooks -> t, this offers a good
speedup (~ 4 or so).

(2) Printing the registry which basically consists of huge hash tables,
causes a lot of garbage.  Most of that garbage seems to be unavoidable
(is it created by the printing primitives?).  Anyway, seems we should
temporarily increase `gc-cons-threshold' drastically, this offers
another speedup of 25% or so.  The patch attached uses the value that
works well for me and the size of my registry, and I bind it in
`gnus-registry-save', because I assume other registries outside of Gnus
can be smaller.  What would be a good value of `gc-cons-threshold', or
should it even scale with `gnus-registry-max-entries' instead of being
constant?

(3) I also decided to change `eieio-override-prin1' to print hash tables
"by hand" from Lisp.  The eieio-persistent requires to modify how
elements in the hash tables are printed, and the current way of doing
this (make a copy of the complete table, change the elements, prin1 and
re-read the result) is not only hackish but also inefficient (it does
this recursively for nested tables).

Any comments on the suggested changes?

TIA,

Michael.




--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-WIP-Try-to-improve-gnus-registry-saving.patch
Content-Transfer-Encoding: quoted-printable

=46rom 618362e3496df18d0f60143b71185ad57501fdcb Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Mon, 13 Apr 2020 23:33:39 +0200
Subject: [PATCH] WIP: Try to improve gnus registry saving

=2D--
 lisp/emacs-lisp/eieio-base.el |  3 ++-
 lisp/emacs-lisp/eieio.el      | 33 +++++++++++++++++++++++++--------
 lisp/gnus/gnus-registry.el    |  1 +
 3 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 2cb1f614ce..010a2b673e 100644
=2D-- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -473,7 +473,8 @@ eieio-persistent-save
     (let* ((cfn (or file (oref this file)))
            (default-directory (file-name-directory cfn)))
       (cl-letf ((standard-output (current-buffer))
-                ((oref this file)       ;FIXME: Why change it?
+                (inhibit-modification-hooks t)
+                ((oref this file) ;FIXME: Why change it?
                  (if file
                      ;; FIXME: Makes a name relative to (oref this file),
                      ;; whereas I think it should be relative to cfn.
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 9f8b639e52..43d515e1fa 100644
=2D-- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -934,15 +934,32 @@ eieio-override-prin1
 	((consp thing)
 	 (eieio-list-prin1 thing))
 	((hash-table-p thing)
-         (let ((copy (copy-hash-table thing)))
-	   (maphash
+         (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 ")
+         (prin1 (hash-table-rehash-size thing))
+         (princ " rehash-threshold ")
+         (prin1 (hash-table-rehash-threshold thing))
+         (princ " data (")
+         (let* ((eieio-print-depth (if eieio-print-indentation
+                                       (1+ eieio-print-depth)
+                                     eieio-print-depth))
+                (do-indent (if eieio-print-indentation
+                               (lambda () (princ (make-string (* eieio-pr=
int-depth 2) ? )))
+                             #'ignore)))
+           (maphash
 	    (lambda (key val)
-	      (setf (gethash key copy)
-		    (read
-		     (with-output-to-string
-		       (eieio-override-prin1 val)))))
-	    copy)
-	   (prin1 copy)))
+              (princ "\n")
+              (funcall do-indent)
+              (prin1 key)
+              (princ " ")
+              (eieio-override-prin1 val))
+            thing))
+         (princ "))"))
 	((vectorp thing)
          (let ((copy (copy-sequence thing)))
 	  (dotimes (i (length copy))
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 480ed80ef8..4ac3c84a80 100644
=2D-- 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)
=2D-
2.25.1


--=-=-=--




Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#40704; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 1 Oct 2020 18:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.