mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +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:
parent
bb1d362f8a
commit
899127701e
@ -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)
|
Loading…
Reference in New Issue
Block a user