go/src/cmd/api
Bryan C. Mills 946a8669d9 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>
2022-01-26 19:17:30 +00:00
..
testdata/src all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
goapi.go cmd/api: reduce parallel 'go list' invocations to a constant 2022-01-26 19:17:30 +00:00
goapi_test.go
run.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00