mirror of
https://github.com/grassrootseconomics/eth-tracker.git
synced 2026-05-16 18:05:20 +02:00
perf: increase worker pool queue buffer size 1 -> ~4k
* Previosuly the worker queue pool buffer size was 1 which applies a backpressure on the fast missing blocks producer * Define our queue size and why we chose this value
This commit is contained in:
@@ -8,14 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type PoolOpts struct {
|
||||
Logg *slog.Logger
|
||||
WorkerCount int
|
||||
Logg *slog.Logger
|
||||
WorkerCount int
|
||||
BlocksBuffer int
|
||||
}
|
||||
|
||||
func NewPool(o PoolOpts) *pond.WorkerPool {
|
||||
return pond.New(
|
||||
o.WorkerCount,
|
||||
1,
|
||||
o.BlocksBuffer,
|
||||
pond.Strategy(pond.Balanced()),
|
||||
pond.PanicHandler(panicHandler(o.Logg)),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user