Memoise checkSourcePath()
This prevents hydra-eval-jobs from statting the same files over and over again.
This commit is contained in:
		
							parent
							
								
									9064dd2f4d
								
							
						
					
					
						commit
						9fd7cf98db
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
| #include "hash.hh" | ||||
| 
 | ||||
| #include <map> | ||||
| #include <unordered_map> | ||||
| 
 | ||||
| 
 | ||||
| namespace nix { | ||||
|  | @ -100,6 +101,9 @@ private: | |||
| 
 | ||||
|     std::map<std::string, std::pair<bool, std::string>> searchPathResolved; | ||||
| 
 | ||||
|     /* Cache used by checkSourcePath(). */ | ||||
|     std::unordered_map<Path, Path> resolvedPaths; | ||||
| 
 | ||||
| public: | ||||
| 
 | ||||
|     EvalState(const Strings & _searchPath, ref<Store> store); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue