1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:38:33 -06:00
go/imports
Brad Fitzpatrick 87f95283ac imports: limit local disk concurrency, avoid reads in non-Go directories
If $GOPATH was large, or $GOPATH was $HOME and $HOME/src had
many files, the unbounded concurrency in loadPkgIndex/loadPkg
could make the operating system unhappy with so many
threads. (sigh once again for no async file IO and needing
threads for file operations)

In addition, don't call go/build.Context.Import on directories
that we've already determined to have no go files in them.
It's just a waste of time. Makes it about 3x faster on my
machine with hot caches and a big $HOME/src.

Fixes golang/go#7731

LGTM=iant, adg
R=golang-codereviews, iant, adg
CC=david.crawshaw, golang-codereviews
https://golang.org/cl/85670044
2014-04-08 16:43:52 -07:00
..
fix_test.go imports: extend findImports to return a boolean, rename, that tells 2014-03-25 09:37:10 -04:00
fix.go imports: limit local disk concurrency, avoid reads in non-Go directories 2014-04-08 16:43:52 -07:00
imports.go imports: fix a case where we weren't gofmt-compatible 2014-02-07 17:03:34 -08:00
mkindex.go go.tools/imports: move goimports from github to go.tools. 2013-12-17 21:21:03 -05:00
mkstdlib.go imports: bake in the standard library again 2014-01-26 09:47:31 -08:00
sortimports_compat.go go.tools/imports: move goimports from github to go.tools. 2013-12-17 21:21:03 -05:00
sortimports.go go.tools/imports: move goimports from github to go.tools. 2013-12-17 21:21:03 -05:00
zstdlib.go imports: bake in the standard library again 2014-01-26 09:47:31 -08:00