mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue Improve the speed of do-nothing build. As @thockin found out here https://github.com/kubernetes/kubernetes/issues/24518, vast majority of the do-nothing build time is spent in rebuilding the test binaries. There is no staleness check support for test binaries. This commit implements the staleness checks for test binaries and uses them while building packages. On my workstation, do-nothing hack/build-go.sh time goes from ~20 secs to ~4 secs, of which only ~1 sec is from doing test binary staleness check now (as opposed to ~17 secs it took to build the test binaries before). I did some experiments to bring this time down to <1 sec. I measured using go test -bench, but it was not very useful in this case. I believe, a vast majority of that ~1 second is being spent in fork/exec and piping the results back to the staleness check program along with the ser-deser involved, but it needs to be validated. Not a proof, but to provide some supporting evidence to this claim, running `go list -f format packages` in the shell takes about 600ms irrespective of what's in the format. Tests are TBD. I am still trying to figure out how to test this, but I would like to get early feedback cc @mikedanese @mml |
||
---|---|---|
.. | ||
etcd.sh | ||
golang.sh | ||
init.sh | ||
test.sh | ||
util.sh | ||
version.sh |