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
internal/gopathwalk: walk directories concurrently
This restores the concurrent walking that was removed in CL 508506,
since that concurrency turns out to actually matter in practice
(see golang/go#44863), but uses a different (and in my opinion simpler)
concurrency pattern based on the one shown in my 2018 GopherCon talk
(https://drive.google.com/file/d/1nPdvhB0PutEJzdCq5ms6UI58dp50fcAN/view,
slide 114), and removes the arbitrary 4-goroutine minimum.
On my machine this speeds up the benchmark from CL 561436
by a factor of around 3½.
goos: linux
goarch: amd64
pkg: golang.org/x/tools/internal/imports
cpu: Intel(R) Xeon(R) CPU @ 2.20GHz
│ before.txt │ after.txt │
│ sec/op │ sec/op vs base │
ModuleResolver_InitialScan-24 1728.0m ± 5% 505.2m ± 7% -70.76% (p=0.000 n=10)
Fixesgolang/go#65531.
Updates golang/go#44863.
Change-Id: I082bb3375f7775d55d130bf75ae71f53312aace1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/561675
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
0 commit comments