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

cmd/compile: build time increased in go 1.15 #40781

Closed
nikgalushko opened this issue Aug 14, 2020 · 5 comments
Closed

cmd/compile: build time increased in go 1.15 #40781

nikgalushko opened this issue Aug 14, 2020 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin

Comments

@nikgalushko
Copy link

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

$ go version
go1.15 darwin/amd64

Does this issue reproduce with the latest release?

No.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/n.galushko/go/bin"
GOCACHE="/Users/n.galushko/Library/Caches/go-build"
GOENV="/Users/n.galushko/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/n.galushko/go/pkg/mod"
GONOPROXY="gitlab.inplatlabs.ru/*"
GONOSUMDB="gitlab.inplatlabs.ru/*"
GOOS="darwin"
GOPATH="/Users/n.galushko/go"
GOPRIVATE="gitlab.inplatlabs.ru/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/n.galushko/Projects/vkpay/go_vkpay/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2b/dlwj9v052dddcbf2lcxt0_lw0000gp/T/go-build902696119=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I compared three projects: remark42, kittenhouse, nda project (35k loc). I checked build time and binary size on my macbook pro 15 2017 i7 2.9Ghz. Build options: go clean -cache && time go build. See the result on chart (less is better).
Снимок экрана 2020-08-13 в 22 12 32

What did you expect to see?

Build time has not changed.

What did you see instead?

Build time increased about 8-9%.

@seankhliao
Copy link
Member

I don't see any slowdown

16:43:26 ~/remark42/backend/app
master » for i in {1..5}; do time go1.14.7 build -a ./... ; done
go1.14.7 build -a ./...  76.53s user 6.19s system 354% cpu 23.336 total
go1.14.7 build -a ./...  78.38s user 6.26s system 356% cpu 23.746 total
go1.14.7 build -a ./...  78.69s user 5.88s system 358% cpu 23.567 total
go1.14.7 build -a ./...  77.73s user 6.35s system 357% cpu 23.526 total
go1.14.7 build -a ./...  78.43s user 6.19s system 357% cpu 23.697 total

16:46:40 ~/remark42/backend/app
master » for i in {1..5}; do time go1.15 build -a ./... ; done
go1.15 build -a ./...  74.71s user 6.26s system 358% cpu 22.612 total
go1.15 build -a ./...  75.35s user 6.34s system 359% cpu 22.693 total
go1.15 build -a ./...  76.03s user 6.32s system 359% cpu 22.929 total
go1.15 build -a ./...  76.50s user 6.12s system 358% cpu 23.036 total
go1.15 build -a ./...  76.34s user 6.03s system 358% cpu 22.964 total

16:50:34 ~/remark42/backend/app
master » for i in {1..5}; do go clean -cache && time go1.14.7 build ./... ; done
go1.14.7 build ./...  47.73s user 3.49s system 346% cpu 14.779 total
go1.14.7 build ./...  48.94s user 3.43s system 348% cpu 15.026 total
go1.14.7 build ./...  48.57s user 3.41s system 349% cpu 14.860 total
go1.14.7 build ./...  48.11s user 3.56s system 349% cpu 14.779 total
go1.14.7 build ./...  48.25s user 3.30s system 348% cpu 14.778 total

16:51:58 ~/remark42/backend/app
master » for i in {1..5}; do go clean -cache && time go1.15 build ./... ; done
go1.15 build ./...  45.39s user 3.50s system 352% cpu 13.879 total
go1.15 build ./...  45.32s user 3.48s system 351% cpu 13.869 total
go1.15 build ./...  45.56s user 3.47s system 352% cpu 13.922 total
go1.15 build ./...  45.79s user 3.46s system 351% cpu 14.008 total
go1.15 build ./...  45.80s user 3.56s system 349% cpu 14.111 total

@nikgalushko
Copy link
Author

Hmm… interesting. I installed golang from .dmg form official site. How did you install ?

@ALTree ALTree changed the title build time increased in go 1.15 cmd/compile: build time increased in go 1.15 Aug 14, 2020
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 14, 2020
@seankhliao
Copy link
Member

seankhliao commented Aug 14, 2020

go get golang.org/dl/go1.x.y

edit: I'm also on linux, so it may be mac specific?

@nikgalushko
Copy link
Author

Maybe. I can reinstall golang via your way and check build time the day after tomorrow.

@networkimprov
Copy link

Possibly due to #40727?

@gopherbot add OS-Darwin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin
Projects
None yet
Development

No branches or pull requests

5 participants