-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: 100% CPU utilization with soft links #40342
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
@silentred: In your case, would #37697 (comment) resolve the issue? Was the |
@stamblerre The dir structure is like:
#37697 looks great. I think ignoring node_modules could fix this issue. |
Thanks for sharing that info. Actually, in this case, #37697 wouldn't solve the issue, as the |
Thanks for the reply. I think ignoring the dir webui is also supposed to do the trick. |
Oh good point. In that case, I will close this in favor of #37697. |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
My go project dir is /my-project. In this dir, there is a webui sub dir, witch is initialized with npm. When I open VSCode to do changes on /my-project, gopls process keeps running at 700% CPU utility.
I used go pprof to generate a flame graph. There were lots of CPU running at filepath.EvalSymlinks and os.Stat. I guess it has something to do with node_modules. I moved webui dir out of /my-project, then CPU utility dropped to normal.
I hope gopls could support excluding files like vscode does. And I see a issue with the same request. #37697
#37697
The profiling file is attached.
pprof.samples.cpu.002.pb.gz
The text was updated successfully, but these errors were encountered: