From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#36447: 27.0.50; New "Unknown keyword" errors Date: Tue, 09 Jul 2019 17:05:53 -0400 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="115334"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, npostavs@gmail.com, 36447@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 23:07:23 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 1hkxKa-000Tr7-K7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 23:07:20 +0200 Original-Received: from localhost ([::1]:56144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkxKZ-0000FD-Ce for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 17:07:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52503) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkxKL-0000Eg-VK for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 17:07:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkxKJ-00053q-AT for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 17:07:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkxKJ-00053O-3M for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 17:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkxKI-0000nc-H7 for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 17:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 21:07: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.15627063623003 (code B ref 36447); Tue, 09 Jul 2019 21:07:02 +0000 Original-Received: (at 36447) by debbugs.gnu.org; 9 Jul 2019 21:06:02 +0000 Original-Received: from localhost ([127.0.0.1]:34381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkxJK-0000m4-6Y for submit@debbugs.gnu.org; Tue, 09 Jul 2019 17:06:02 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkxJI-0000lq-Bm for 36447@debbugs.gnu.org; Tue, 09 Jul 2019 17:06:00 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3758B100608; Tue, 9 Jul 2019 17:05:55 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D58811008A7; Tue, 9 Jul 2019 17:05:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1562706353; bh=G/bJHPWnF4Uci22XxoecoxMdR3TOW3ITzydL2bTjnMo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cYAuGF3Vree8k+yPPhwy4cBhPZB+2hndGJGr2cDIXx2XCs4Wleq0xS+VU9Er5eTUL 54uGMLCtkk7bEUoPhHLtHDVKPZrmD0Eooy6cjRkwTf0ee3bGyFmmEK/QyDFJ+OC6oB uJgum1iIQxOZUCTsssmuvBDQ4iB2/8yuP8LWZ6j3qM8WJ6CciDeBgGX+IRToIeW+UJ QolAXABnI14zji7tWTfkI3NYJy9jtAI8225BOEXS94haiKsvF90I1GG2XPlSMpHmP1 CKxHWTIxouFGFp00vE7WtKZ8i45WSfsAojtv0MO3LMKeURA7f1w1TL88eDQPZ6A54S BPad2V6lfNa8A== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B14D0120152; Tue, 9 Jul 2019 17:05:53 -0400 (EDT) In-Reply-To: (Pip Cet's message of "Sat, 6 Jul 2019 15:08:08 +0000") 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:162555 Archived-At: I think we should get Daniel's opinion on this. Stefan > 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.