conc icon indicating copy to clipboard operation
conc copied to clipboard

Performance degradation with context pool after v0.3.0

Open adriantam opened this issue 3 months ago • 1 comments

Our project are using context pool (with WithContext(), WithCancelOnError(), WithFirstError() and WithMaxGoroutines()). After upgrading from v0.3.0 to [5f936ab](https://github.com/sourcegraph/conc/commit/5f936abd7ae87036af1f75c95fb9d0daaf00116b), we have observed performance degradation (significant increase in CPU). The usually pattern involves pool.New(), pool.Go() and pool.Wait() with high concurrency.

adriantam avatar Sep 18 '25 13:09 adriantam

@adriantam I will happily try to debug this. Could you please provide a sample piece of code that exhibits this behavior? This would be great in the form of a Benchmark test. https://pkg.go.dev/testing#hdr-Benchmarks

srabraham avatar Oct 21 '25 15:10 srabraham