mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Build all commands at the same time
In Go it's much more efficient to build several commands in the same
`go build` because the build has to load most of the dependency tree
each time. Roughly 50% on my machine:
Together (go1.2 on OS X):
real 0m4.049s
user 0m8.387s
sys 0m2.766s
Separate:
real 0m13.392s
user 0m12.420s
sys 0m6.882s
This commit is contained in:
@@ -31,7 +31,4 @@ if [ $# -gt 0 ]; then
|
||||
BINARIES="$@"
|
||||
fi
|
||||
|
||||
for b in $BINARIES; do
|
||||
echo "+++ Building ${b}"
|
||||
go build "${KUBE_GO_PACKAGE}"/cmd/${b}
|
||||
done
|
||||
go build $(for b in $BINARIES; do echo "${KUBE_GO_PACKAGE}"/cmd/${b}; done)
|
||||
Reference in New Issue
Block a user