guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 77/182: derivations: Use a regular hash table for the module cache.
Date: Fri, 15 Nov 2019 00:01:41 -0500 (EST)

kkebreau pushed a commit to branch wip-gnome-updates
in repository guix.

commit a633c7bc3527f7a9c9fd0019a7ba306fe5af6fbe
Author: Ludovic Courtès <address@hidden>
Date:   Wed Nov 6 22:02:34 2019 +0100

    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.
---
 guix/derivations.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/derivations.scm b/guix/derivations.scm
index bde9370..6cdf55b 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]