-
Notifications
You must be signed in to change notification settings - Fork 18.9k
x/tools/gopls: completions taking 20x as long since https://github.com/golang/tools/commit/41e4e5654988 #62665
Copy link
Copy link
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/completionIssues related to auto-completion in gopls.Issues related to auto-completion in gopls.gopls/performanceIssues related to gopls performance (CPU, memory, etc).Issues related to gopls performance (CPU, memory, etc).
Milestone
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/completionIssues related to auto-completion in gopls.Issues related to auto-completion in gopls.gopls/performanceIssues related to gopls performance (CPU, memory, etc).Issues related to gopls performance (CPU, memory, etc).
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
The line starts as:
Change that to:
Then:
(with the cursor in the
_position, then attempt completion.What did you expect to see?
Fast results.
What did you see instead?
Slow results.
The following table shows some pretty accurate wall time numbers for the completion call returning. For reference, my machine is an M1 Max 64GB memory, running Linux via VMWare Fusion.
golang.org/x/toolsCommitLog files for each result from the first column of timings:
I have bisected this slowdown to golang/tools@41e4e5654988.
This appears to highlight a couple of things to me:
cc @findleyr