guix-commits
[Top][All Lists]
Advanced

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

01/05: profiles: 'check-for-collisions' filters out more non-collisions


From: guix-commits
Subject: 01/05: profiles: 'check-for-collisions' filters out more non-collisions upfront.
Date: Sat, 5 Jun 2021 17:41:06 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 2ac5e07a898a218532fd5e08b6c71fcfc2310ad8
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 4 23:44:09 2021 +0200

    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?.
---
 guix/profiles.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index ca997a7..ed5c103 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



reply via email to

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