-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/gopls: high cpu when call go mod tidy #70608
Comments
xtra information: |
I found that go list also cause the CPU to soar.. |
Thank you. This is almost certainly related to go list: when you add an import we run Does this occur for even a small module? If so, then it may indicate some real bug in go list (for example, mismatching paths that cause spurious cache misses). |
Without further testing, I have moved to WSL to work on it, and while there is no evidence, I suspect Windows Defender is involved |
Thanks, that sounds likely if it works well in WSL. Please comment if I am misunderstanding. |
Go version
go version go1.22.8 windows/amd64
Output of
go env
in your module/workspace:What did you do?
When I plan to write code normally and use some libraries from the current file, gopls will automatically import the library for me, which will cause the CPU to soar, causing the entire gopls to be temporarily paralyzed (highlighting, completion, prompts)
What did you see happen?
Sudden CPU surge
go mod tidy -modfile=C:\Users\lang\AppData\Local\Temp\gopls-tempmod246022334\go.mod
What did you expect to see?
gopls running normally
The text was updated successfully, but these errors were encountered: