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:
Clayton Coleman 2014-07-25 13:23:23 -04:00
parent bb1d362f8a
commit 899127701e

View File

@ -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)