Implement RemoteStore::queryMissing()
This provides a significant speedup, e.g. 64 s -> 12 s for nix-build --dry-run -I nixpkgs=channel:nixos-16.03 '<nixpkgs/nixos/tests/misc.nix>' -A test on a cold local and CloudFront cache. The alternative is to use lots of concurrent daemon connections but that seems wasteful.
This commit is contained in:
		
							parent
							
								
									963f2bf12b
								
							
						
					
					
						commit
						ba20730b3f
					
				
					 5 changed files with 44 additions and 3 deletions
				
			
		|  | @ -592,6 +592,17 @@ static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVe | |||
|         break; | ||||
|     } | ||||
| 
 | ||||
|     case wopQueryMissing: { | ||||
|         PathSet targets = readStorePaths<PathSet>(*store, from); | ||||
|         startWork(); | ||||
|         PathSet willBuild, willSubstitute, unknown; | ||||
|         unsigned long long downloadSize, narSize; | ||||
|         store->queryMissing(targets, willBuild, willSubstitute, unknown, downloadSize, narSize); | ||||
|         stopWork(); | ||||
|         to << willBuild << willSubstitute << unknown << downloadSize << narSize; | ||||
|         break; | ||||
|     } | ||||
| 
 | ||||
|     default: | ||||
|         throw Error(format("invalid operation %1%") % op); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue