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/go: Slowdown in compile time on 1.4.1 with cgo #9664
Comments
Please run "go build -x" with both versions. Please also give some timings: what does "much slower" mean? |
And how did you install 1.4.1? Normally this is caused by incorrect cross |
@ianlancetaylor Here's the difference between 1.3 and 1.4:
@minux I originally used the osx binary for both versions. To go back and test, I used gvm to get 1.3. |
I don't see anything unusual. Given that go1.4.1 user time + sys time is much less than the real time, I think this might be Both sys time and user time tripled for 1.4.1, as compared to 1.3, I don't know why yet. My benchmark with warm disk cache doesn't show any significant differences between 1.3.3 |
On OS X with warm cache, $ /usr/bin/time go133 build cgobench.go Close as not reproducible. |
@minux forgive my ignorance, but after compiling once, shouldn't the number speed up the next time? I get the same result every time. |
You need to install rather than build. |
So every time the user time + sys time is significantly smaller than real |
@minux but it's different when I swap go versions, all within the same minute or two. No virus scanner, no real load on the cpu. Very odd. And the slowdown happened immediately after installing 1.4. |
That is strange. Can any OS X user reproduce this problem? I can't. |
I hit this. Running a simple go test -x showed that go was compiling every library that the test was using. After deleting $GOPATH/pkg and running go install ./... for my project each go test just compiled the test files and picked up pre-compiled libraries. |
I'm seeing this as well on Running You can repro on sha b4f84714470109201bcbcaa78bcff3c849def0da of letsencrypt/boulder if you wish. |
Just upgraded from
go1.3.2 darwin/amd64
togo version go1.4.1 darwin/amd64
. Simple use of cgo now compiles much slower.The text was updated successfully, but these errors were encountered: