mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
copyPaths(): Use queryValidPaths() to reduce SSH latency
This commit is contained in:
parent
91d67692cf
commit
c5b83d8913
10 changed files with 45 additions and 37 deletions
|
@ -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([](
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue