Use between 2 and 256MiB for buffering depending on the number of drives

Changelog-entry: Use between 2 and 256MiB for buffering depending on the number of drives
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-06-10 14:52:04 +02:00
parent 52bdd02a4b
commit 59e37182be

View File

@ -119,7 +119,7 @@ async function writeAndValidate({
onProgress, onProgress,
verify, verify,
trim: autoBlockmapping, trim: autoBlockmapping,
numBuffers: 32, numBuffers: Math.min(2 + (destinations.length - 1) * 32, 256),
decompressFirst, decompressFirst,
}); });
const result: WriteResult = { const result: WriteResult = {