Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/goimports: performance issue w/ decently sized $GOPATH/src and undefined identifiers #17612

Closed
sporkmonger opened this issue Oct 26, 2016 · 1 comment
Labels
Milestone

Comments

@sporkmonger
Copy link

@sporkmonger sporkmonger commented Oct 26, 2016

What version of Go are you using (go version)?

go version go1.7.3 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/sporkmonger/Projects/Go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.3/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pj/bcdnqjjs2gqdf7yjcgwmlk0c0000gn/T/go-build162676308=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

time goimports -v < myfile.go

What did you expect to see?

Sub-second performance.

What did you see instead?

Multiple seconds to complete when identifiers in source are undefined, causing editor to hang during execution.

https://gist.github.com/sporkmonger/215a6c9d757cf2e8c466f4ac527f72d9

As requested in #17591.

@rakyll rakyll changed the title goimports performance issue w/ decently sized $GOPATH/src and undefined identifiers x/tools/cmd/goimports: performance issue w/ decently sized $GOPATH/src and undefined identifiers Oct 31, 2016
@rakyll rakyll added this to the Unreleased milestone Oct 31, 2016
@gopherbot gopherbot added the Tools label Sep 12, 2019
@heschik
Copy link
Contributor

@heschik heschik commented Nov 7, 2019

This bug is very old, and the gist is gone. If this is still an issue, please comment with a new repro. Sorry for the delay.

@heschik heschik closed this Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.