mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	Two small SHAMapSync improvements:
1) Don't acquire so many nodes per pass. It's likely far more than we need. 2) Right-size the finishedReads_ vector on passes other than just the first.
This commit is contained in:
		@@ -305,6 +305,7 @@ SHAMap::gmn_ProcessDeferredReads(MissingNodes& mn)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    mn.finishedReads_.clear();
 | 
			
		||||
    mn.finishedReads_.reserve(mn.maxDefer_);
 | 
			
		||||
    mn.deferred_ = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -321,7 +322,7 @@ SHAMap::getMissingNodes(int max, SHAMapSyncFilter* filter)
 | 
			
		||||
    MissingNodes mn(
 | 
			
		||||
        max,
 | 
			
		||||
        filter,
 | 
			
		||||
        4096,  // number of async reads per pass
 | 
			
		||||
        512,  // number of async reads per pass
 | 
			
		||||
        f_.getFullBelowCache(ledgerSeq_)->getGeneration());
 | 
			
		||||
 | 
			
		||||
    if (!root_->isInner() ||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user