From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#36447: 27.0.50; New "Unknown keyword" errors Date: Wed, 10 Jul 2019 05:38:01 +0300 Message-ID: <83ef2y4nsm.fsf@gnu.org> References: <875zon7x0a.fsf@web.de> <87h884fo0i.fsf@web.de> <85d0is5ry1.fsf@gmail.com> <87lfxdgs1k.fsf@web.de> <83y31capj1.fsf@gnu.org> <83tvc0anwi.fsf@gnu.org> <83r274an61.fsf@gnu.org> <83pnmoacft.fsf@gnu.org> <83bly7acg9.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="62724"; mail-complaints-to="usenet@blaine.gmane.org" Cc: michael_heerdegen@web.de, npostavs@gmail.com, pipcet@gmail.com, 36447@debbugs.gnu.org To: Stefan Monnier , Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 10 04:39:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hl2Vn-000G8Z-78 for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jul 2019 04:39:15 +0200 Original-Received: from localhost ([::1]:57620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl2Vm-0000OZ-7s for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 22:39:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54474) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hl2Vb-0000OG-RL for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 22:39:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hl2Va-0001tU-Oa for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 22:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hl2Va-0001tF-KE for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 22:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hl2Va-0000xb-DY for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 22:39: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: Wed, 10 Jul 2019 02:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36447 X-GNU-PR-Package: emacs Original-Received: via spool by 36447-submit@debbugs.gnu.org id=B36447.15627263053647 (code B ref 36447); Wed, 10 Jul 2019 02:39:02 +0000 Original-Received: (at 36447) by debbugs.gnu.org; 10 Jul 2019 02:38:25 +0000 Original-Received: from localhost ([127.0.0.1]:34646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hl2Uz-0000wk-16 for submit@debbugs.gnu.org; Tue, 09 Jul 2019 22:38:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hl2Ux-0000wX-1k for 36447@debbugs.gnu.org; Tue, 09 Jul 2019 22:38:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hl2Uq-0001Je-5g; Tue, 09 Jul 2019 22:38:16 -0400 Original-Received: from [176.228.60.248] (port=2571 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hl2Up-0008S3-Id; Tue, 09 Jul 2019 22:38:15 -0400 In-reply-to: (message from Stefan Monnier on Tue, 09 Jul 2019 17:05:53 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162588 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , michael_heerdegen@web.de, npostavs@gmail.com, 36447@debbugs.gnu.org > Date: Tue, 09 Jul 2019 17:05:53 -0400 > > I think we should get Daniel's opinion on this. Daniel, could you please comment on the issues discussed in this bug? > > On Sat, Jul 6, 2019 at 6:45 AM Eli Zaretskii wrote: > >> > > Indeed. I'm attaching a proof of concept that we can simply freeze the > >> > > hash tables when dumping and thaw them when loading a dump, which > >> > > includes rehashing. Do you happen to know why it wasn't done that way? > >> > > >> > I'd guess it was to shorten the startup time by doing this rehashing lazily. > >> > >> The function pdumper-stats with show the time it took to load Emacs, > >> so the effect of this on the load time can be measured > > > > I'm measuring it directly, and it's more than I expected: about a > > millisecond, for 4,300 hash table entries. What we can't easily > > measure is how much the lazy rehashing code would slow us down anyway. > > > > For comparison, the entire time stored in pdumper-stats is 15 ms here. > > > > I don't think that's significant, because we'd probably end up > > rehashing most of the large hash tables anyway. We're saving some 250 > > KB of space in the pdmp image, which was previously used for redundant > > information. (I'm surprised it's that much, but I guess pdumper > > relocations are fairly large?) > > > > I'm attaching a revised patch, which uses vectors rather than consed > > lists for both the key_and_value vector, avoiding a copy in the common > > case where there is more than one hash table entry, and for the list > > of hash tables. It still contains debugging/timing code. > > > > charset.c currently assumes hash table entries will stay at the same > > index in Vcharset_hash_table. I think that works okay in practice, > > because we don't shrink or reorder hash tables, but it was still a bit > > of a nasty surprise. > > > > This concept appears to work: modify pdumper to special-case hash > > tables and freeze/thaw them properly. You probably shouldn't dump hash > > tables with complicated user-defined hash functions. > > > > Both PURE_P and pdumper_object_p fail to distinguish between tables > > that were pure or impure before being dumped. > > > > This also fixes the bug that (hash-table-count dumped-hash-table) will > > return a negative number if no previous access to the hash table has > > happened, but of course we can fix that directly... > > > > Of course, we're still modifying purecopied information. > >