diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-03-16T12·50+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-03-16T12·50+0100 |
commit | c5b83d8913d73ea58ff9437c41bf6bd0c6839ad0 (patch) | |
tree | a7b934a170322b26d8039461102a66de922308e2 /src/libstore/legacy-ssh-store.cc | |
parent | 91d67692cfb05e4ece744fb9d144921ae920f2de (diff) |
copyPaths(): Use queryValidPaths() to reduce SSH latency
Diffstat (limited to 'src/libstore/legacy-ssh-store.cc')
-rw-r--r-- | src/libstore/legacy-ssh-store.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index 1a933259b526..84bf0f727f4b 100644 --- a/src/libstore/legacy-ssh-store.cc +++ b/src/libstore/legacy-ssh-store.cc @@ -226,6 +226,19 @@ struct LegacySSHStore : public Store out.insert(res.begin(), res.end()); } + PathSet queryValidPaths(const PathSet & paths, bool maybeSubstitute = false) override + { + auto conn(connections->get()); + + conn->to + << cmdQueryValidPaths + << false // lock + << maybeSubstitute + << paths; + conn->to.flush(); + + return readStorePaths<PathSet>(*this, conn->from); + } }; static RegisterStoreImplementation regStore([]( |