diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-27 14:32:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-31 15:55:20 -0700 |
commit | e9d8e82bcf08972d6c16a3e1e0f286d1294cf9e6 (patch) | |
tree | c5cdf9d3e0bd54f2194484c75739f30819145f76 /src/data.lisp | |
parent | ab469268b42d8fc8b0a180990be40e925a65935a (diff) | |
download | consfigurator-e9d8e82bcf08972d6c16a3e1e0f286d1294cf9e6.tar.gz |
UPLOAD-ALL-PREREQUISITE-DATA: query remote cache contents just once
Should improve performance, especially when connection latency is high. We
already implicitly assume that only one attempt to upload prerequisite data is
going on at once.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/data.lisp')
-rw-r--r-- | src/data.lisp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/data.lisp b/src/data.lisp index c78784c..fe96809 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -342,15 +342,16 @@ CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM." (remote-data-pathname iden1 iden2 version))))) (loop with *data-sources* = (cons (register-data-source :asdf) *data-sources*) + with remote-cached + = (sort-prerequisite-data-cache + (get-remote-cached-prerequisite-data connection)) for (iden1 . iden2) in (get-hostattrs :data) for highest-remote-version = (caddar (remove-if-not (lambda (c) (and (string= (first c) iden1) (string= (second c) iden2))) - (sort-prerequisite-data-cache - (get-remote-cached-prerequisite-data - connection)))) + remote-cached)) for (thunk highest-local-version) = (handler-case (multiple-value-list (%get-data iden1 iden2)) (missing-data () nil)) |