ipfs / go-bitswap

The golang implementation of the bitswap protocol
MIT License
216 stars 112 forks source link

Make blockstoreWorkerCount configurable #448

Closed Kubuxu closed 3 years ago

Kubuxu commented 3 years ago

It would be great if blockstoreWorkerCount from internal/decision/engine.go was configurable. Currently, it spawns 128 goroutines per bitswap which is really noisy in tests.

dirkmc commented 3 years ago

Ideally the worker count would be dynamic - increasing as new jobs are added and then floating downwards as jobs finish. In any case even with a dynamic worker count it will still be useful to have a configurable upper limit on the number of workers.