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:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
type (
|
||||
QueueOpts struct {
|
||||
QueueSize int
|
||||
Logg *slog.Logger
|
||||
Processor *processor.Processor
|
||||
Pool *pond.WorkerPool
|
||||
@@ -27,7 +28,7 @@ type (
|
||||
func New(o QueueOpts) *Queue {
|
||||
return &Queue{
|
||||
logg: o.Logg,
|
||||
processChan: make(chan uint64, 17_280),
|
||||
processChan: make(chan uint64, o.QueueSize),
|
||||
stopSignal: make(chan interface{}),
|
||||
processor: o.Processor,
|
||||
pool: o.Pool,
|
||||
|
||||
Reference in New Issue
Block a user