derivations: Use a regular hash table for the module cache.

The hit rate of the 'add-data-to-store' cache goes from 10% to 4% on:

  guix build -e '(@@ (gnu packages libreoffice) libreoffice)' -nd

* guix/derivations.scm (%module-cache): Turn into a regular hash table.
It didn't make sense to use a weak-value hash table given that values
are pairs.
This commit is contained in:
Ludovic Courtès 2019-11-06 22:02:34 +01:00
parent 91d1955df9
commit 6654677675
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -1208,7 +1208,7 @@ they can refer to each other."
(define %module-cache
;; Map a list of modules to its 'imported+compiled-modules' result.
(make-weak-value-hash-table))
(make-hash-table))
(define* (imported+compiled-modules store modules #:key
(system (%current-system))