mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02: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:
parent
608b0265e1
commit
e0204f8d46
21 changed files with 318 additions and 353 deletions
|
@ -43,6 +43,12 @@ public:
|
|||
return p;
|
||||
}
|
||||
|
||||
template<typename T2>
|
||||
ref<T2> cast()
|
||||
{
|
||||
return ref<T2>(std::dynamic_pointer_cast<T2>(p));
|
||||
}
|
||||
|
||||
template<typename T2>
|
||||
operator ref<T2> ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue