-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: 'go env' takes 5+ seconds on my Mac #50982
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
Comments
I'm seeing this too. |
Observed ~2 seconds initial delay on |
I just tried it on the work Mac and I also see this. |
I just tested and got 7.5 seconds! |
I just tested several times and got: > time go env
...
go env 0.05s user 0.05s system 74% cpu 0.126 total |
macOS 12.0.1 / MacBook Pro M1 / go 1.18beta1 go env 0.04s user 0.19s system 82% cpu 0.278 total |
It could also be a check on |
Probably not |
Just tried on my Mac (more data points, probably not hurtful):
This was without pre-warming Go. |
Change https://go.dev/cl/392454 mentions this issue: |
I don't know why, but 'go env' regularly takes 5+ seconds on my MacBook Pro, and it's really annoying.
A second 'go env' shortly thereafter is quick.
I suspect the time is going into invoking clang to determine which flags are valid.
I wonder if we are doing that wrong, or if we can avoid it more often?
I also wonder whether this is due to some kind of antivirus/execution "safety" thing on my Mac that forgets that clang is OK.
But I don't know for sure it's clang at all.
Is anyone else seeing this?
The text was updated successfully, but these errors were encountered: