-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: cgo based vendored libraries take forever to run #14081
Comments
When you say it takes a long time to run, are you measuring the time of If you are measuring the time of |
Don't use go run, or go build as they will not cache the result of Use go install to build and cache the results of compilation which will On Mon, 25 Jan 2016, 03:03 Ian Lance Taylor notifications@github.com
|
Timing it
Yeah when I run it with the -x option it shows that is calling gcc every single time, Something like this
I'm using go version go1.5.2 linux/amd64 so there is no i option so I could not try it out. So I tried go install
and the first compilation too time but after that it cached it and it became fast
|
I'm closing this question as answered. We don't use the issue tracker for questions. Please see https://golang.org/wiki/Questions . Thanks. |
It seems if I install a cgo based library into my vendor packages and try to run my main file it takes a very long time to run but if i don't vendor these packages it runs in normal time.
This is the code I tried to run
My GoENV
I just run
go run main.go
maybe its an issue with the go compiler I guess it doesn't compile cgo based libraries in vendor packages and put them in this folder pkg/linux_amd64 and I think it might be recompiling them everytime just running the sqlite example takes a minute if its vendored.The sqlite3 package is present in my
vendor/github.com/mattn/go-sqlite3
directory.I've posted the issue here also Masterminds/glide#223
The text was updated successfully, but these errors were encountered: