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

Comments

@juancer
Copy link

@juancer 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 this to the Unreleased milestone Jan 28, 2021
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Jan 28, 2021

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

@juancer

This comment has been hidden.

@seankhliao

This comment has been hidden.

@juancer

This comment has been hidden.

@juancer

This comment has been hidden.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jan 28, 2021

/cc @heschik

@heschi
Copy link
Contributor

@heschi 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 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 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 Feb 1, 2021
@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants