You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\dmc\AppData\Local\go-build
set GOENV=C:\Users\dmc\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\dmc\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\dmc\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\02-software-install-dir\16-golang
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=D:\02-software-install-dir\16-golang\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.2
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=D:\04-dev-code\01-golang\01-dmc-dev\dmc\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\dmc\AppData\Local\Temp\go-build1810198819=/tmp/go-build -gno-record-gcc-switches
What did you do?
I use windows to develop go programs, recently found that my computer is getting slower and slower, when I open vscode, I don't run go run main.go, I just write go code in vscode, when I save the go file, my computer's cpu will suddenly rise to 100%, I don't know what's going on, I can only see that go.exe occupies a very high cpu,
What did you see happen?
when I save the go file, my computer's cpu will suddenly rise to 100%,as shown below
I wonder why: my computer's CPU spikes to 100% when I don't start the go run main.go program, just writing a static go file
What did you expect to see?
I wish I was writing a go file on window, the cpu wouldn't go up to 100%
Editor and settings
Logs
No response
The text was updated successfully, but these errors were encountered:
dmc-hukaixuan
added
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
labels
Apr 21, 2024
seankhliao
changed the title
windows cpu use 100%
x/tools/gopls: windows cpu use 100%
Apr 21, 2024
Hi, I would love to get to the bottom of this, but we need more information, which may take a bit of back and forth. In general, the go commands run by VS Code or gopls should be short-lived, and should not be invoked on every save.
Those go commands could be started by gopls to list the workspace. Or they could perhaps be started either directly or indirectly by VS Code. Can you share the command line arguments or parent processes of those go commands, perhaps by using process explorer (https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer)
Sorry if that's not the best way -- I'm not a regular windows user.
Does this reproduce with just a simple workspace folder with, for example, just a main.go file?
gopls version
0.15.3
go env
What did you do?
I use windows to develop go programs, recently found that my computer is getting slower and slower, when I open vscode, I don't run go run main.go, I just write go code in vscode, when I save the go file, my computer's cpu will suddenly rise to 100%, I don't know what's going on, I can only see that go.exe occupies a very high cpu,
What did you see happen?
when I save the go file, my computer's cpu will suddenly rise to 100%,as shown below
I wonder why: my computer's CPU spikes to 100% when I don't start the go run main.go program, just writing a static go file
What did you expect to see?
I wish I was writing a go file on window, the cpu wouldn't go up to 100%
Editor and settings
Logs
No response
The text was updated successfully, but these errors were encountered: