From 58ef4d9a95584fb89ebcf6222fbac6e698aa6b0b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Jul 2012 11:08:47 -0400 Subject: Add a function queryValidPaths() queryValidPaths() combines multiple calls to isValidPath() in one. This matters when using the Nix daemon because it reduces latency. For instance, on "nix-env -qas \*" it reduces execution time from 5.7s to 4.7s (which is indistinguishable from the non-daemon case). --- src/libstore/store-api.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 802591766af7..13dcd9269d3a 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -113,6 +113,9 @@ public: /* Check whether a path is valid. */ virtual bool isValidPath(const Path & path) = 0; + /* Query which of the given paths is valid. */ + virtual PathSet queryValidPaths(const PathSet & paths) = 0; + /* Query the set of all valid paths. */ virtual PathSet queryAllValidPaths() = 0; -- cgit 1.4.1