Skip to content

x/tools/gopls: missing fields / methods in completion results #53992

@findleyr

Description

@findleyr

While working in x/tools recently, I observed that I was sometimes missing struct fields in completion results. This should never be the case.

It turns out these results are missing due to completion budget being exhausted. Setting "completionBudget" to "1s" worked. Bisecting, I discovered that prior to https://go.dev/cl/347563 I generally (though not always) got the results I expected.

Clearly our regression testing is not catching regressions in completion performance, and the default completion budget of 100ms can lead to significantly degraded results.

We need to:

  1. Investigate why struct fields could ever be missed in completion results.
  2. Evaluate our current completion benchmarks, improve them if necessary, and hook them into performance monitoring (see also x/tools,x/build: performance monitoring for gopls #53538).
  3. Look for low-hanging improvements to completion performance (there must be some, for example the performance hit of https://go.dev/cl/347563 should be easy to mitigate).

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/performanceIssues related to gopls performance (CPU, memory, etc).

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions