New constructor topicsdb.NewWithThreadPool() makes the same topicsdb.Index that by legacy topicsdb.New() but wrapped with threads-in-use limiter.
It prevents the 'thread exhaustion' fail but leads to not full CPU/Mem utilization, i.e. more 'eth_getLogs' calls will be rejected by timeout. Const topicsdb.GoroutinesPerThread is for tuning.
New constructor
topicsdb.NewWithThreadPool()
makes the sametopicsdb.Index
that by legacytopicsdb.New()
but wrapped with threads-in-use limiter. It prevents the 'thread exhaustion' fail but leads to not full CPU/Mem utilization, i.e. more 'eth_getLogs' calls will be rejected by timeout. Consttopicsdb.GoroutinesPerThread
is for tuning.( debug util is not included to product and can be found in https://github.com/Fantom-foundation/go-opera/tree/2d3ba7409e145242cf46a035fc22b8f5a9eebce0/cmd/pdb )