Skip to content
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/gopls: memory usage #43968

Closed
juancer opened this issue Jan 28, 2021 · 9 comments
Closed

x/tools/gopls: memory usage #43968

juancer opened this issue Jan 28, 2021 · 9 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@juancer
Copy link

juancer commented Jan 28, 2021

What version of Go are you using (go version)?

$ go version
go version go1.15.7 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\user\AppData\Local\go-build
set GOENV=C:\Users\user\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\user\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\user\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\user~1\AppData\Local\Temp\go-build341909526=/tmp/go-build -gno-record-gcc-switches

What did you do?

just save a change on my project

What did you expect to see?

Better improvement of the memory

What did you see instead?

here you have the img:
https://ibb.co/94kgRXy

@seankhliao seankhliao changed the title Memory killer on windows 10 x/tools/gopls: memory usage Jan 28, 2021
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jan 28, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jan 28, 2021
@seankhliao
Copy link
Member

please follow the steps in https://github.com/golang/tools/blob/gopls/v0.6.4/gopls/doc/troubleshooting.md#debug-memory-usage to include the relevant information when filing issues about gopls

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 28, 2021
@juancer

This comment has been minimized.

@seankhliao

This comment has been minimized.

@juancer

This comment has been minimized.

@juancer

This comment has been minimized.

@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jan 28, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Jan 28, 2021
@stamblerre
Copy link
Contributor

/cc @heschik

@heschi
Copy link
Contributor

heschi commented Jan 28, 2021

You seem to have a number of particularly expensive packages, notably golang.org/x/text, open in your workspace. Have you opened your entire GOPATH as your workspace folder? That will definitely lead to very high memory usage. We'd like to be more efficient, but for now you will be much better off opening just the project you're working on.

@juancer
Copy link
Author

juancer commented Jan 28, 2021

Hi @heschik, I just have one project and all the packages that I have installed is what i'm using.
Can I just disable the execution?

@heschi
Copy link
Contributor

heschi commented Jan 28, 2021

Please make sure that the folder you've opened as your workspace folder in VSCode contains only code you've written. If you still see high memory usage, please upload a gopls log following https://github.com/golang/vscode-go/blob/master/docs/troubleshooting.md#collect-gopls-information?

@juancer juancer closed this as completed Feb 1, 2021
@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Feb 1, 2021
@golang golang locked and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants