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

gocode-gomod eats all my memory and freezes editor #249

Closed
itzmanish opened this issue Jun 23, 2020 · 3 comments
Closed

gocode-gomod eats all my memory and freezes editor #249

itzmanish opened this issue Jun 23, 2020 · 3 comments

Comments

@itzmanish
Copy link

go version

  • go version go1.14.4 linux/amd64

code -v

  • 1.46.1
  • cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
  • x64

VS Code Go extension version

  • 0.14.4

go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/manish/.cache/go-build"
GOENV="/home/manish/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/manish/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build283301174=/tmp/go-build -gno-record-gcc-switches"

After working for several time after saving my go code (format on save is on) vscode freezes (everything editor, sidebar, terminal). I checked what cause freeze in system monitor and found gocode-gomod eating up my almost all available memory however that doesn't cause my window lag or any other runing app freeze. After some second vscode asks me to reload.

OS- Ubuntu 20.04

@stamblerre
Copy link
Contributor

I'm sorry you're having this experience. gocode-gomod is in maintenance mode, so active development has been paused. I would recommend switching to the language server, gopls for a better experience. You can enable it by setting "go.useLanguageServer": true in your editor.

@itzmanish
Copy link
Author

I'm sorry you're having this experience. gocode-gomod is in maintenance mode, so active development has been paused. I would recommend switching to the language server, gopls for a better experience. You can enable it by setting "go.useLanguageServer": true in your editor.

Thanks.
gopls also eating huge memory 😁 but it is faster than gocode-gomod.

@stamblerre
Copy link
Contributor

Please follow the steps mentioned in golang/go#36943 (comment) to report a memory issue with gopls. I'll go ahead and close this issue.

@golang golang locked and limited conversation to collaborators Jun 23, 2021
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

3 participants