[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/09: derivations: Improve complexity of 'substitution-oracle'.
From: |
Ludovic Courtès |
Subject: |
05/09: derivations: Improve complexity of 'substitution-oracle'. |
Date: |
Wed, 22 Jul 2015 20:56:56 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit b59df2434aafb8604df38662be1b428bd19b80d6
Author: Ludovic Courtès <address@hidden>
Date: Wed Jul 22 18:31:51 2015 +0200
derivations: Improve complexity of 'substitution-oracle'.
* guix/derivations.scm (substitution-oracle): Use a final 'concatenate'
instead of repeated 'append's.
---
guix/derivations.scm | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/guix/derivations.scm b/guix/derivations.scm
index f12127f..d694ccf 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -264,16 +264,16 @@ substituter many times."
(derivation-prerequisites drv valid-input?)))
(let* ((paths (delete-duplicates
- (fold (lambda (drv result)
- (let ((self (match (derivation->output-paths drv)
- (((names . paths) ...)
- paths))))
- (if (every valid? self)
- result
- (append (append self (dependencies drv))
- result))))
- '()
- drv)))
+ (concatenate
+ (fold (lambda (drv result)
+ (let ((self (match (derivation->output-paths drv)
+ (((names . paths) ...)
+ paths))))
+ (if (every valid? self)
+ result
+ (cons* self (dependencies drv) result))))
+ '()
+ drv))))
(subst (list->set (substitutable-paths store paths))))
(cut set-contains? subst <>)))
- branch master updated (1436c5c -> 31ea3eb), Ludovic Courtès, 2015/07/22
- 01/09: gnu: guile-minikanren: Fix README location., Ludovic Courtès, 2015/07/22
- 02/09: size: Remove leftover 'pk'., Ludovic Courtès, 2015/07/22
- 03/09: import: hackage: Remove reference to unbound variable., Ludovic Courtès, 2015/07/22
- 04/09: doc: Mention initial passwords in "System Installation"., Ludovic Courtès, 2015/07/22
- 05/09: derivations: Improve complexity of 'substitution-oracle'.,
Ludovic Courtès <=
- 07/09: size: Add '--substitute-urls' option., Ludovic Courtès, 2015/07/22
- 06/09: derivations: Improve docstring of 'substitution-oracle'., Ludovic Courtès, 2015/07/22
- 08/09: doc: Mention zeroed mtimes in the binary tarball., Ludovic Courtès, 2015/07/22
- 09/09: Thank Dave., Ludovic Courtès, 2015/07/22