guix/guix/store
Ludovic Courtès fe5de925aa
deduplicate: Avoid traversing directories twice.
Until now, we'd call (nar-sha256 file) unconditionally.  Thus, if FILE
was a directory, we would traverse it for no reason, and then call
'deduplicate' on FILE, which would again traverse it.

This change also removes redundant (mkdir-p store) calls from the loop,
and avoids 'lstat' calls by using 'scandir*'.

* guix/store/deduplication.scm (deduplicate): Add named loop.  Move
'mkdir-p' outside the loop.  Use 'scandir*' instead of 'scandir'.  Do
not call 'nar-sha256' when FILE has type 'directory.
2020-06-22 15:42:55 +02:00
..
database.scm database: 'register-items' takes an open database. 2020-06-18 14:48:17 +02:00
deduplication.scm deduplicate: Avoid traversing directories twice. 2020-06-22 15:42:55 +02:00
roots.scm daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'. 2019-09-08 11:49:24 +02:00
schema.sql database: 'with-database' can now initialize new databases. 2018-06-14 11:16:58 +02:00
ssh.scm