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

Build all commands at the same time #626

Merged
merged 2 commits into from
Jul 25, 2014

Conversation

smarterclayton
Copy link
Contributor

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

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
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something that's been bugging me for a while is that test-go.sh takes package names with a preceding pkg/ but build-go.sh adds an implied cmd/. Since you're changing this anyway, could you remove the implied cmd/ here? (That way tab autocomplete works ;) )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Update places that depend on it.
@brendandburns
Copy link
Contributor

LGTM

brendandburns added a commit that referenced this pull request Jul 25, 2014
Build all commands at the same time
@brendandburns brendandburns merged commit 2515094 into kubernetes:master Jul 25, 2014
@smarterclayton smarterclayton deleted the speed_up_build branch February 11, 2015 02:21
vishh pushed a commit to vishh/kubernetes that referenced this pull request Apr 6, 2016
Fix build. change  event.Event to info.Event.
mqliang pushed a commit to mqliang/kubernetes that referenced this pull request Dec 8, 2016
Fixed kubernetes#589: when rebooting, failed to start sshd service after kube-down
mqliang pushed a commit to mqliang/kubernetes that referenced this pull request Mar 3, 2017
Fixed kubernetes#589: when rebooting, failed to start sshd service after kube-down
wking pushed a commit to wking/kubernetes that referenced this pull request Jul 21, 2020
sanchezl pushed a commit to sanchezl/kubernetes that referenced this pull request Mar 22, 2021
Ensure multi-az test is run in the serial job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants