You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Performance degradation with context pool after v0.3.0 #154
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 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
@adriantam this issue doesn't provide enough detail to be a useful bug report. Here's a benchmark test I made that satisfies the vague requirements in your original comment. The benchmark results on my machine are basically identical at HEAD versus at 1df97ec from Jan 2023. That's the farthest back we can go, because commits from before that won't build, due to a missing repository.
Activity
srabraham commentedon Oct 21, 2025
@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 commentedon Dec 12, 2025
@adriantam this issue doesn't provide enough detail to be a useful bug report. Here's a benchmark test I made that satisfies the vague requirements in your original comment. The benchmark results on my machine are basically identical at HEAD versus at 1df97ec from Jan 2023. That's the farthest back we can go, because commits from before that won't build, due to a missing repository.