-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/cmd/guru: find references results in high CPU on windows visual studio code #30298
Comments
Can you send a SIGQUIT signal to the process a few times and share the resulting stack traces? |
Not sure how to do that in Windows 10 64 bit, I do have process explorer that tries to show a stacktrace but shows addresses and threads instead of actual methods/funcs from the stacktrace. This one is by doing show all references on a method in guru itself, guessImportPath(...), which produces the following command line in Visual Studio Code: C:\git\go\bin\guru.exe -modified referrers C:\git\go\src\golang.org\x\tools\cmd\guru\what.go:#5199 Process explorer shows |
Ok, so what I notice is that with find references the entire gopath is being investigated; causes heavy disk usage and CPU. Thought that referrers would only search the currently active go project instead. Is there a reason the entire gopath is being analysed? |
in what way could the /vendor folder be skipped for the 'find all references'? |
@MelleKoning: We are currently no longer making improvements to guru, as we are focusing efforts on |
The same problem on Mac, see also fatih/vim-go#2509 |
guru was deleted in #65880; closing as obsolete. |
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
find all references on a method within Visual Studio Code, this executes guru.exe:
guru -referrers
This issue is also listed here:
microsoft/vscode-go#2084
Have tried updating guru.exe with the solution described here:
golang/tools#56 (comment)
Did not work. Eventually debugged and guru is parsing an entire tree by calling build.go from guru.go func importQueryPackage; that's where the high CPU load is occurring.
There is some code in build.go source code that uses slashes "/" for pathnames instead of os.PathSeparator, and wondering if that might be related to the issue?
You have to kill guru.exe process to put an end to its misery use of the CPU and memory, unfortunately.
What did you expect to see?
the referrals
What did you see instead?
high cpu and memory usage and Visual Studio Code is waiting for guru.exe to return with results, which does not happen.
The text was updated successfully, but these errors were encountered: