Comments (5)
@EdgarLip Since the "Search" functionality does not directly interact with this extension or its tools, we need more info for triage.
-
Run
Developer: Open Process Explorer
from Command Palette. Do the extensionHost and gopls consume much cpu/memory? -
Enable gopls logging by adding this to your settings.json.
"go.languageServerFlags": ["-rpc.trace"]
Then, open the "gopls" output channel (Output: Show Output Channel
-> select 'gopls (server)' from the drop down). Run search. Do you see a lot of disc scanning activities or error messages? -
Are you running antivirus programs? If you disable the programs, or allowlist
go
andgopls
, do you see any changes in performance?
from vscode-go.
Hi @hyangah
thanks for taking this one !
• here is a snippet of the process explorer during very long search :
• added the flag:
restarted few times "vscode" ... but i do not see the 'gopls (server)' in the drop down list.
•added go to be allowed by the FW:
again restart everything just in case ... no change...
i do not know how to add gopls.
from vscode-go.
Thanks for sharing the screenshots. I don't see anything obvious unfortunately.
From the process explorer, I guess extensionHost[3]
is the one corresponding to the window with go files since that's the only one with gopls
process. That process and its children consumes 0% of CPU. Memory usage is also not too high. In fact, other VS Code processes seem also idle.
- Have you looked into the window's process monitor?
- Is the problem present when all other extensions are disabled and only golang.go extension is activated?
- The gopls trace is in the OUTPUT tab (bottom window in the standard layout). Can you share the trace?
from vscode-go.
1)i have successfully added the gopls to the FW exceptions as well :
which in my case located : C:\Users<name>\go\bin\gopls.exe
-
i have disable and even uninstalled all plugins , and even when go is the only one installed - this is happening.
i will not recreate it right now to show ... since it took so much of my time. -
here is how the search looks like for the windows task explorer, during search is running:
-
after playing long time with the searches and with the task explorer ( and after excluding the gopls - from the FW
as mentioned above ), it looks the issue is now not persistent as was previously, but happens only when
"microsoft defender antibvirus service" service is at it's peak ( don't know what it's doing )
then search is slow.
from vscode-go.
Thanks for the detailed info and screenshot.
it looks the issue is now not persistent as was previously, but happens only when
"microsoft defender antibvirus service" service is at it's peak
It looks like the issue is the Antivirus software.
Microsoft Defender Antivirus Service is the anti-virus software. I don't know exactly what it is doing, but there are many reports in the internet that talk about slowness caused by Microsoft Defender. See https://groups.google.com/g/golang-nuts/c/IR8v3B1pPCI/m/-yrCL_j0HAAJhttps://groups.google.com/g/golang-nuts/c/IR8v3B1pPCI/m/-yrCL_j0HAAJ
Try to adjust exclusion rules to skip files in the directories used by the go command and gopls:
https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c301afe13b26
or
https://www.dell.com/support/kbdoc/en-us/000128249/windows-defender-resolving-high-hard-disk-drive-and-cpu-usage-during-scans
For example, configure the anti-virus scanner to skip directories reported by
go env GOMODCACHE GOBUILDCACHE
and the CacheDir
directory reported by gopls.exe stats
.
Since the issue is not the extension's issue but requires the antivirus software configuration, I will close the issue.
from vscode-go.
Related Issues (20)
- settings wiki refers to deprecated `go.languageServerExperimentalFeatures` HOT 3
- Use GOTOOLCHAIN=auto in gopls update logic HOT 3
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- Support .templ files with Go auto complete etc HOT 7
- Use dotenv for reading env files HOT 1
- remove double space in "func" snippets
- gopls: automated issue report (crash) HOT 1
- NON retour a la ligne et Non espace HOT 2
- gopls: automated issue report (crash) HOT 3
- Takes ages to save file on windows
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- debug golang project, breakpoint is invalid HOT 7
- gopls: automated issue report (crash) HOT 2
- gopls: automated issue report (crash) HOT 2
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 3
- Release v0.42.0 HOT 5
- testing: Install Tests using the local fake proxy fail with go1.19/1.20 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-go.