summaryrefslogtreecommitdiff
path: root/src/minibuf.c
diff options
context:
space:
mode:
authorPip Cet <pipcet@gmail.com>2020-08-11 02:16:53 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-08-11 02:27:43 -0700
commit16a16645f524c62f7906036b0e383e4247b58de7 (patch)
treeec9af0e89b5494707fc630d5cebec267737d98d7 /src/minibuf.c
parent0d0aad213f941efc0fa0ec032e37dc9c2b08c9fb (diff)
downloademacs-16a16645f524c62f7906036b0e383e4247b58de7.tar.gz
Rehash hash tables eagerly after loading a dump
This simplifies code, and helps performance in some cases (Bug#36597). * src/lisp.h (hash_rehash_needed_p): Remove. All uses removed. (hash_rehash_if_needed): Remove. All uses removed. (struct Lisp_Hash_Table): Remove comment about rehashing hash tables. * src/pdumper.c (thaw_hash_tables): New function. (hash_table_thaw): New function. (hash_table_freeze): New function. (dump_hash_table): Simplify. (dump_hash_table_list): New function. (hash_table_contents): New function. (Fdump_emacs_portable): Handle hash tables by eager rehashing. (pdumper_load): Restore hash tables. (init_pdumper_once): New function.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 9d870ce3640..cb302c5a605 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1212,9 +1212,6 @@ is used to further constrain the set of candidates. */)
bucket = AREF (collection, idx);
}
- if (HASH_TABLE_P (collection))
- hash_rehash_if_needed (XHASH_TABLE (collection));
-
while (1)
{
/* Get the next element of the alist, obarray, or hash-table. */