mirror of
https://github.com/restic/restic.git
synced 2026-02-17 06:23:56 +00:00
restore: reduce contention while writing files
This commit is contained in:
@@ -79,10 +79,12 @@ func newFileRestorer(dst string,
|
||||
workerCount := int(connections)
|
||||
|
||||
return &fileRestorer{
|
||||
idx: idx,
|
||||
blobsLoader: blobsLoader,
|
||||
startWarmup: startWarmup,
|
||||
filesWriter: newFilesWriter(workerCount, allowRecursiveDelete),
|
||||
idx: idx,
|
||||
blobsLoader: blobsLoader,
|
||||
startWarmup: startWarmup,
|
||||
// use a large number of buckets to minimize bucket contention in filesWriter
|
||||
// buckets are relatively cheap, so we can afford to have a lot of them
|
||||
filesWriter: newFilesWriter(1024, allowRecursiveDelete),
|
||||
zeroChunk: repository.ZeroChunk(),
|
||||
sparse: sparse,
|
||||
progress: progress,
|
||||
|
||||
Reference in New Issue
Block a user