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
cmd/go: VCS stamping is slow #49582
Comments
cc @matloob |
I can reproduce; the problem seems to be that we run two
We're not even running those commands in different directories:
The fix seems relatively simple: within a single build, if we've already queried the VCS information for a VCS root directory, cache that and avoid querying it again. |
Indeed, these seem to account for the entire slowdown:
|
At least suppressing the repeated calls should be an easy fix. (This also looks like another case where #29666 would really help.) |
Change https://golang.org/cl/365394 mentions this issue: |
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The two commits were found via bisection and make up for virtually all of the increase in runtime. The underlying storage is fast NVMe, which makes the slowdown more impressive, even for a repository the size of Kubernetes.
/cc @jayconrod @bcmills
The text was updated successfully, but these errors were encountered: