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

Significantly speed-up make #38700

Merged
merged 2 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ kube::golang::place_bins() {
if [[ -d "${full_binpath_src}" ]]; then
mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}"
find "${full_binpath_src}" -maxdepth 1 -type f -exec \
rsync -ptc {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
rsync -pc {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
fi
done
}
Expand Down
4 changes: 2 additions & 2 deletions hack/make-rules/helpers/cache_go_dirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ fi
mkdir -p $(dirname "${CACHE}")
if $("${NEED_FIND}"); then
kfind -type f -name \*.go \
| xargs -n1 dirname \
| LC_ALL=C sort -u \
| sed 's|/[^/]*$||' \
Copy link
Member

Choose a reason for hiding this comment

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

worth also changing to sed -e 's|/[^/]*$||' -e 's|^./||' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't expect much improvement. The issue was that dirname was called once per file. Sed only runs once.

| sed 's|^./||' \
| LC_ALL=C sort -u \
> "${CACHE}"
fi
cat "${CACHE}"