summaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-06-04 23:44:09 +0200
committerLudovic Courtès <ludo@gnu.org>2021-06-05 23:39:25 +0200
commit2ac5e07a898a218532fd5e08b6c71fcfc2310ad8 (patch)
tree1b716013b8cc74538b929e0f3109ad50e6e4d51f /guix/profiles.scm
parentf1e0e5fde34ff0e882247498ecf78106c73284d6 (diff)
downloadguix-patches-2ac5e07a898a218532fd5e08b6c71fcfc2310ad8.tar
guix-patches-2ac5e07a898a218532fd5e08b6c71fcfc2310ad8.tar.gz
profiles: 'check-for-collisions' filters out more non-collisions upfront.
When running: GUIX_PROFILING="gc object-cache" ./pre-inst-env \ guix install gnome -p /tmp/sdsdfsd --no-grafts -n this reduces the number of object cache lookup from 115K to 96K, with a slight CPU and memory usage reduction as well. * guix/profiles.scm (check-for-collisions)[candidates]: Exclude entries if their 'item' fields are eq?.
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index ca997a7125..ed5c10315a 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -334,7 +334,10 @@ file name."
(filter-map (lambda (entry)
(let ((other (lookup (manifest-entry-name entry)
(manifest-entry-output entry))))
- (and other (list entry other))))
+ (and other
+ (not (eq? (manifest-entry-item entry)
+ (manifest-entry-item other)))
+ (list entry other))))
(manifest-transitive-entries manifest)))
(define lower-pair