2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-04 01:50:48 +00:00

Increase concurrency for loading blobs

This commit is contained in:
Alexander Neumann 2015-02-17 23:15:08 +01:00
parent b6f25aa690
commit 677a5038c5

View File

@ -16,8 +16,9 @@ import (
)
const (
maxConcurrentBlobs = 32
maxConcurrency = 10
maxConcurrentBlobs = 32
maxConcurrency = 10
maxConcurrencyPreload = 100
// chunkerBufSize is used in pool.go
chunkerBufSize = 512 * chunker.KiB
@ -80,7 +81,7 @@ func (arch *Archiver) Preload() error {
// start workers
var wg sync.WaitGroup
for i := 0; i < maxConcurrency; i++ {
for i := 0; i < maxConcurrencyPreload; i++ {
wg.Add(1)
go worker(&wg, idCh)
}