Speed up fetching package replacements

This commit is contained in:
Christopher Baines 2024-01-31 12:30:51 +00:00
parent 7d9704192d
commit 9779ecf3cd

View file

@ -655,7 +655,17 @@
(inferior-packages inf)))))
(replacements
(with-time-logging "getting inferior package replacements"
(map inferior-package-replacement packages)))
(map
(lambda (inf-pkg has-replacement?)
(and has-replacement?
(inferior-package-replacement inf-pkg)))
packages
(inferior-eval
`(map (lambda (id)
(->bool (package-replacement
(hash-ref %package-table id))))
(list ,@(map inferior-package-id packages)))
inf))))
(pkg-to-replacement-hash-table
(let ((ht (make-hash-table)))
(for-each