about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-11T15·08-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-11T15·08-0400
commit58ef4d9a95584fb89ebcf6222fbac6e698aa6b0b (patch)
tree1e01e79b406f59b06397a24b4b86f1c6fa5fc308 /src/libstore/store-api.hh
parent667d5f1936616dc829f9f92f8e5d5141ba5285a7 (diff)
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).
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh3
1 files changed, 3 insertions, 0 deletions
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;