Skip to content

x/tools/gopls: high cpu usage all the time #70172

@newhook

Description

@newhook

gopls version

0.16.2

go env

GO111MODULE=''
GOARCH='arm64'
GOBIN='/Users/matthew/.local/share/mise/installs/go/1.22.3/bin'
GOCACHE='/Users/matthew/Library/Caches/go-build'
GOENV='/Users/matthew/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS='-buildvcs=false'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/matthew/go/pkg/mod'
GONOPROXY='github.com/customerio/*'
GONOSUMDB='github.com/customerio/*'
GOOS='darwin'
GOPATH='/Users/matthew/go'
GOPRIVATE='github.com/customerio/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/matthew/.local/share/mise/installs/go/1.22.3'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/matthew/.local/share/mise/installs/go/1.22.3/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/matthew/services/go.mod'
GOWORK=''
CGO_CFLAGS='-I/Users/matthew/.local/lib/foundationdb/7.3.26/usr/local/include'
CGO_CPPFLAGS='-I/Users/matthew/.local/lib/foundationdb/7.3.26/usr/local/include'
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-L/Users/matthew/.local/lib/foundationdb/7.3.26/usr/local/lib'
PKG_CONFIG='/opt/homebrew/bin/pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/md/zrgmx7p53159906_lsrbfykc0000gn/T/go-build2676139738=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

open cursor on a go project. goplus is constantly at 200-400% cpu, even if I'm not doing anything.

What did you see happen?

high cpu usage.

What did you expect to see?

not high cpu usage.

Editor and settings

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/imports

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions