mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 11:36:03 +01:00
Optimize DummyStore::isValidPathUncached
See the API docs for the rationale of why this is needed.
This commit is contained in:
parent
136825b4a2
commit
18941a2421
1 changed files with 9 additions and 0 deletions
|
|
@ -164,6 +164,15 @@ struct DummyStoreImpl : DummyStore
|
|||
callback(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Do this to avoid `queryPathInfoUncached` computing `PathInfo`
|
||||
* that we don't need just to return a `bool`.
|
||||
*/
|
||||
bool isValidPathUncached(const StorePath & path) override
|
||||
{
|
||||
return path.isDerivation() ? derivations.contains(path) : Store::isValidPathUncached(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* The dummy store is incapable of *not* trusting! :)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue