core: improve the prefetcher concurrency allowance

This commit is contained in:
Gary Rong 2025-06-10 14:43:04 +08:00 committed by Csaba Kiraly
parent 846d13a31a
commit 8167810345
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -57,7 +57,7 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c
workers errgroup.Group workers errgroup.Group
reader = statedb.Reader() reader = statedb.Reader()
) )
workers.SetLimit(runtime.NumCPU() / 2) workers.SetLimit(4 * runtime.NumCPU() / 5) // Aggressively run the prefetching
// Iterate over and process the individual transactions // Iterate over and process the individual transactions
for i, tx := range block.Transactions() { for i, tx := range block.Transactions() {