derivations: Improve complexity of 'substitution-oracle'.
* guix/derivations.scm (substitution-oracle): Use a final 'concatenate' instead of repeated 'append's.
This commit is contained in:
parent
1bd4e6db15
commit
b59df2434a
|
@ -264,16 +264,16 @@ substituter many times."
|
||||||
(derivation-prerequisites drv valid-input?)))
|
(derivation-prerequisites drv valid-input?)))
|
||||||
|
|
||||||
(let* ((paths (delete-duplicates
|
(let* ((paths (delete-duplicates
|
||||||
(fold (lambda (drv result)
|
(concatenate
|
||||||
(let ((self (match (derivation->output-paths drv)
|
(fold (lambda (drv result)
|
||||||
(((names . paths) ...)
|
(let ((self (match (derivation->output-paths drv)
|
||||||
paths))))
|
(((names . paths) ...)
|
||||||
(if (every valid? self)
|
paths))))
|
||||||
result
|
(if (every valid? self)
|
||||||
(append (append self (dependencies drv))
|
result
|
||||||
result))))
|
(cons* self (dependencies drv) result))))
|
||||||
'()
|
'()
|
||||||
drv)))
|
drv))))
|
||||||
(subst (list->set (substitutable-paths store paths))))
|
(subst (list->set (substitutable-paths store paths))))
|
||||||
(cut set-contains? subst <>)))
|
(cut set-contains? subst <>)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue