cbaines pushed a commit to branch master
in repository data-service.

commit ba9bcbf7356c0ae703bd583fea4f3f37104da10c
Author: Christopher Baines <[email protected]>
AuthorDate: Sun Oct 3 15:28:40 2021 +0100

    Use a bigger start size for the hash table
    
    This might help when there's lots of derivations to insert.
---
 guix-data-service/model/derivation.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/model/derivation.scm 
b/guix-data-service/model/derivation.scm
index b258803..208bee6 100644
--- a/guix-data-service/model/derivation.scm
+++ b/guix-data-service/model/derivation.scm
@@ -1786,7 +1786,10 @@ INNER JOIN derivation_source_files
   (if (null? derivation-file-names)
       '()
       (let* ((derivations-count (length derivation-file-names))
-             (derivation-ids-hash-table (make-hash-table derivations-count)))
+             (derivation-ids-hash-table (make-hash-table
+                                         ;; Account for more derivations in
+                                         ;; the graph
+                                         (* 2 derivations-count))))
         (simple-format
          #t "debug: derivation-file-names->derivation-ids: processing ~A 
derivations\n"
          derivations-count)

Reply via email to