From c5b83d8913d73ea58ff9437c41bf6bd0c6839ad0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Mar 2017 13:50:01 +0100 Subject: copyPaths(): Use queryValidPaths() to reduce SSH latency --- src/libstore/legacy-ssh-store.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/libstore/legacy-ssh-store.cc') diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index 1a933259b5..84bf0f727f 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(*this, conn->from); + } }; static RegisterStoreImplementation regStore([]( -- cgit 1.4.1