diff options
author | Christopher Baines <mail@cbaines.net> | 2024-01-31 12:30:51 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-01-31 12:30:51 +0000 |
commit | 9779ecf3cd3b10c9ed2bb94c0b459ddfc2d85467 (patch) | |
tree | 3409c6de8095e5b9ec89fac000076fa5033dc514 /guix-data-service | |
parent | 7d9704192dcdfb43d79c387494ec67f87248d32d (diff) | |
download | data-service-9779ecf3cd3b10c9ed2bb94c0b459ddfc2d85467.tar data-service-9779ecf3cd3b10c9ed2bb94c0b459ddfc2d85467.tar.gz |
Speed up fetching package replacements
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/jobs/load-new-guix-revision.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 9a36a95..7f1e981 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -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 |