diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-19T16·50+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-19T16·52+0200 |
commit | e0204f8d462041387651af388074491fd0bf36d6 (patch) | |
tree | ecd20759ce49499722d140d653c5678051bcdfc2 /src/libstore/remote-store.hh | |
parent | 608b0265e104b4a97f51e5745b1a32078770f3cf (diff) |
Move path info caching from BinaryCacheStore to Store
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
Diffstat (limited to 'src/libstore/remote-store.hh')
-rw-r--r-- | src/libstore/remote-store.hh | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh index 45bc41804ccf..4ea8e8a5be4d 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/remote-store.hh @@ -26,22 +26,16 @@ public: /* Implementations of abstract store API methods. */ - bool isValidPath(const Path & path) override; + bool isValidPathUncached(const Path & path) override; PathSet queryValidPaths(const PathSet & paths) override; PathSet queryAllValidPaths() override; - ValidPathInfo queryPathInfo(const Path & path) override; - - Hash queryPathHash(const Path & path) override; - - void queryReferences(const Path & path, PathSet & references) override; + std::shared_ptr<ValidPathInfo> queryPathInfoUncached(const Path & path) override; void queryReferrers(const Path & path, PathSet & referrers) override; - Path queryDeriver(const Path & path) override; - PathSet queryValidDerivers(const Path & path) override; PathSet queryDerivationOutputs(const Path & path) override; |