x/tools/gopls: use BFS instead of DFS for deep completions #39113
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.
I suspect that using a breadth-first traversal for deep completions will lead to improvements in the speed with which deep completions finds matching candidates.
I also think this change may allow us to restructure the completions code in way that is a bit clearer by giving completions more defined "phases":
These phases are already exist in the code, but the fact that the deep completions happen in
(*completer).found
muddies the waters a bit.Somewhat related: We could have the 100ms deep completion timeout apply to phases 1 and 2, always (even without deep completions), with no time limit on 3 to avoid dropping matches that we ran out of time to format.
@muirdm: What do you think? I haven't actually tried implementing any of this, so I'm sure I'm missing a lot, but does this sound reasonable / doable?
The text was updated successfully, but these errors were encountered: