Giter VIP home page Giter VIP logo

Comments (5)

hyangah avatar hyangah commented on September 28, 2024

@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 and gopls, do you see any changes in performance?

from vscode-go.

EdgarLip avatar EdgarLip commented on September 28, 2024

Hi @hyangah
thanks for taking this one !

• here is a snippet of the process explorer during very long search :
image

• added the flag:
image
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:
image
again restart everything just in case ... no change...
i do not know how to add gopls.

from vscode-go.

hyangah avatar hyangah commented on September 28, 2024

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?
Screenshot 2024-04-23 at 1 26 58 PM

from vscode-go.

EdgarLip avatar EdgarLip commented on September 28, 2024

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
image

  1. 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.

  2. here is how the search looks like for the windows task explorer, during search is running:
    image

  3. 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 )
    image
    then search is slow.

  4. regarding gopls traces:
    image
    still can not see it ...

from vscode-go.

hyangah avatar hyangah commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.