]> Cypherpunks repositories - gostls13.git/commit
cmd/api: reduce parallel 'go list' invocations to a constant
authorBryan C. Mills <bcmills@google.com>
Wed, 26 Jan 2022 17:45:12 +0000 (12:45 -0500)
committerBryan Mills <bcmills@google.com>
Wed, 26 Jan 2022 19:17:30 +0000 (19:17 +0000)
commit946a8669d92f18a0029abaed9cea36194562a957
tree586a8403f5108127fffd485b2224e88cf44eb4e4
parent719e9894f9a471cd74b8469d9231cd2798b33999
cmd/api: reduce parallel 'go list' invocations to a constant

'go list' has its own internal parallelism, so invoking in in parallel
can produce up to quadratic peak memory usage.

Running 'go list' is also very I/O-intensive, so the higher
parallelism does substantially improve latency; unfortunately, we lack
a good way to balance latency against memory footprint, so we need to
sacrifice some latency for reliability.

Fixes #49957.

Change-Id: Ib53990b46acf4cc67a9141644d97282964d6442d
Reviewed-on: https://go-review.googlesource.com/c/go/+/380994
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/api/goapi.go