x/tools/gopls: unimported package search using up completion budget #41665
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
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:
Below is a CPU pprof from me spamming completion after
The text was updated successfully, but these errors were encountered:
…before unimported completions Unimported completions are expensive and can use up a large portion of completion budget just to find initial deep search candidates. This change moves these expensive operations which search through the module cache to after normal deep completions so we search through more useful candidates first. Fixes golang/go#41434 Fixes golang/go#41665 Change-Id: I6f3963f8c65c1a97833a35738d2e96420de2f6ee Reviewed-on: https://go-review.googlesource.com/c/tools/+/257974 Run-TryBot: Danish Dua <email@example.com> gopls-CI: kokoro <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: Heschi Kreinick <firstname.lastname@example.org> Trust: Danish Dua <email@example.com> (cherry picked from commit c43c25c) Reviewed-on: https://go-review.googlesource.com/c/tools/+/258286 Run-TryBot: Rebecca Stambler <firstname.lastname@example.org> Reviewed-by: Danish Dua <email@example.com> Trust: Rebecca Stambler <firstname.lastname@example.org>