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
				
			
		|  | @ -50,15 +50,10 @@ void printXmlGraph(ref<Store> store, const PathSet & roots) | |||
| 
 | ||||
|         cout << makeNode(path); | ||||
| 
 | ||||
|         PathSet references; | ||||
|         store->queryReferences(path, references); | ||||
| 
 | ||||
|         for (PathSet::iterator i = references.begin(); | ||||
|              i != references.end(); ++i) | ||||
|         { | ||||
|             if (*i != path) { | ||||
|                 workList.insert(*i); | ||||
|                 cout << makeEdge(*i, path); | ||||
|         for (auto & p : store->queryPathInfo(path)->references) { | ||||
|             if (p != path) { | ||||
|                 workList.insert(p); | ||||
|                 cout << makeEdge(p, path); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue