x/tools/gopls: unimported package search using up completion budget #41665
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
On master (5d1fdd8) I'm seeing mysteriously disappearing deep completions:
In the above example, I expect the candidate "foo.blah.baz.l" to continue to show up, but it disappears as I type.
I think completing
fo<>
works because "fo" matches enough "easy" unimported candidates so we don't hit the slow unimported package case. Once I get tofoo<>
, we hit the slow case inunimportedPackages
and that gobbles up the completion budget so there is none left for deep completions.The above example doesn't reproduce in a vacuum. I assume you need a "big enough" go.mod to hit some threshold. Below is the go.mod and foo.go file I used for my example:
Big go.mod
foo.go
Below is a CPU pprof from me spamming completion after
foo<>
:pprof.samples.cpu.045.pb.gz
The text was updated successfully, but these errors were encountered: