1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 17:59:36 +01:00

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().
This commit is contained in:
Eelco Dolstra 2016-04-19 18:50:15 +02:00
parent 608b0265e1
commit e0204f8d46
21 changed files with 318 additions and 353 deletions

View file

@ -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;