Slowed "go build" Performance After Go Upgrade
Recently, users who upgraded from Go 1.2.1 to 1.3 have reported significantly increased build times for "go build." This article explores potential causes and solutions for this slowdown.
Possible Culprits
One potential cause is the presence of dependencies that require recompilation at each build. This can be resolved by executing "go install -a mypackage" to rebuild all dependencies.
Another factor could be outdated object files in the "$GOPATH/pkg" directory. Deleting this directory will ensure that any older files do not interfere with the build process.
Diagnostic Tools
To gain insight into the build process, the "-x" flag can be used with "go build." This flag provides a detailed log of the steps involved and can reveal incompatibilities between toolchain versions.
Additional Tips
The above is the detailed content of Why is 'go build' Slower After Upgrading to Go 1.3?. For more information, please follow other related articles on the PHP Chinese website!