Skip to content

x/tools/gopls: poor performance with very large packages in import graph #61207

Description

@sff2578

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.

    • go version go1.18.10 linux/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.

    • golang.org/x/tools/gopls v0.12.3
      golang.org/x/tools/gopls@v0.12.3 h1:u0wCI9uvt7mnmri6bFBIaWw1XCN6PN8hKv55Zwd+GbE=
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.

  • Check your installed extensions to get the version of the VS Code Go extension

    • v0.39.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

    • go: /usr/local/go1.18.10/bin/go: go version go1.18.10 linux/amd64

    gotests: /usr/local/gopkgs/bin/gotests (version: v1.6.0 built with go: go1.18.10)
    gomodifytags: /usr/local/gopkgs/bin/gomodifytags (version: v1.16.0 built with go: go1.18.10)
    impl: /usr/local/gopkgs/bin/impl (version: v1.1.0 built with go: go1.18.10)
    goplay: /usr/local/gopkgs/bin/goplay (version: v1.0.0 built with go: go1.18.10)
    dlv: /usr/local/gopkgs/bin/dlv (version: v1.20.2 built with go: go1.18.10)
    staticcheck: /usr/local/gopkgs/bin/staticcheck (version: v0.3.3 built with go: go1.18.10)
    gopls: /usr/local/gopkgs/bin/gopls (version: v0.12.3 built with go: go1.18.10)

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

Describe the bug

i manually installed gopls with version v0.11.0, but after some time(less than an hour), go extension will automatically update it to the latest version. I'm having issue with latest gopls(comsuming too much CPU and slow) so i need to stay with older version

Steps to reproduce the behavior:

  1. manually install gopls v0.11.0
  2. connect vscode to server, work for a while
  3. observer gopls is upgraded, in the "go output" of vscode, saw logs:
Installing 1 tool at /usr/local/gopkgs/bin in module mode.
  gopls@0.12.3

Installing golang.org/x/tools/gopls@v0.12.3 (/usr/local/gopkgs/bin/gopls) SUCCEEDED

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    goplsIssues related to the Go language server, gopls.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions