Skip to content

affected/package: Performance issue with VScode using Golang (go1.17.7 windows/amd64) #51402

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

Closed
rexdivakar opened this issue Mar 1, 2022 · 4 comments

Comments

@rexdivakar
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.17.7 windows/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • Build info

 golang.org/x/tools/gopls v0.7.5
  golang.org/x/tools/gopls@v0.7.5 h1:8Az52YwcFXTWPvrRomns1C0N+zlgTyyPKWvRazO9GG8=
  github.com/BurntSushi/toml@v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
  github.com/google/go-cmp@v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
  github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
  golang.org/x/mod@v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
  golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
  golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
  golang.org/x/text@v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
  golang.org/x/tools@v0.1.9-0.20220114220130-fd7798718afd h1:lTnuArxJC+n54TyvWUPyHhrnGxYvhSi13/aM2Ndr4bs=
  golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
  honnef.co/go/tools@v0.2.1 h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY=
  mvdan.cc/gofumpt@v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
 mvdan.cc/xurls/v2@v2.3.0 h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.64.2
      x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.31.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

Describe the bug

A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.

Steps to reproduce the behavior:

VS Code Version: 1.64.2
OS Version: Windows 10 Pro (64)

Install Go Lang from the official site
Install Visual Studio Code
Enable Go support in Visual Studio
Create this program (saved as main.go) in Visual Studio Code:
` package main
import "fmt"

func main() {
fmt.Println("Hi there!")
}`

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
image

Upon writing scripts using VScode in golang language the editor freezes due to Antimalware scan from Windows Defender which slows down my machine

This issue happens only with the latest version go1.17.7 windows/amd64

@seankhliao
Copy link
Member

@rexdivakar
Copy link
Author

Hey @seankhliao i get it but what i'm trying to say is that upto ver 1.17.6 I did not face this issue but after upgrading to latest ver 1.17.7 this happens to be a problem so I'm looking for a possible explanation to fix this to my latest builds

@ALTree
Copy link
Member

ALTree commented Mar 1, 2022

Short explanation: most antivirus programs are trash not always accurate.

The reason this didn't happen with go1.17.6 is that it's older. The 1.17.7 binary is newer and probably hasn't been completely whitelisted yet, or something like that. The point is that there's nothing the Go project can do to fix this. Releasing another binary would only make things worse, because that would be even newer, and thus "less trusted".

The only things you can do are 1) complain to the antivirus vendor 2) keep using 1.17.7 so that the antivirus learns it's okay and stops scanning it 3) downgrade to 1.17.6 until your antivirus vendor properly whitelists the 1.17.7 binaries.

@rexdivakar
Copy link
Author

Got it, Thanks @ALTree for ur brief explanation

@golang golang locked and limited conversation to collaborators Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants