Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: slow completions from #37450

heschik opened this issue Feb 25, 2020 · 5 comments

x/tools/gopls: slow completions from #37450

heschik opened this issue Feb 25, 2020 · 5 comments


Copy link

@heschik heschik commented Feb 25, 2020

Completing out of the ec2 package is horribly slow, apparently because astutil.PathEnclosingInterval doesn't scale. We could add indexes, or stop returning results after the first few hundred.


@muirdm @stamblerre

@heschik heschik added this to the gopls/v1.0.0 milestone Feb 25, 2020
Copy link

@bmurphy1976 bmurphy1976 commented Feb 25, 2020

Awesome! I was just coming here to report the same thing (although with much less detail). I thought my VSCode intellisense was broken, but after debugging it I came to find it was simply taking 12 seconds to load the data for the ec2.EC2 type:

[Trace - 17:04:53.416 PM] Received response 'textDocument/completion - (16)' in 12041ms.
@heschik heschik modified the milestones: gopls/v1.0.0, gopls/v0.4.0 Feb 26, 2020
Copy link

@gopherbot gopherbot commented Feb 26, 2020

Change mentions this issue: internal/lsp/source: speed up completion candidate formatting

Copy link

@muirdm muirdm commented Feb 26, 2020

The proof-of-concept CL above helps a lot, but it is still too slow if you have completion documentation enabled. We can probably speed that up too using the same cache-types.Object-to-ast.Node approach, but I want to hear what others think.

@stamblerre stamblerre modified the milestones: gopls/v0.4.0, gopls/v0.5.0 Apr 2, 2020
Copy link

@mlieberman85 mlieberman85 commented Apr 16, 2020

Is there anything that can be done from a gopls config level while is being worked on for gopls to ignore problematic packages like ec2?

Copy link

@stamblerre stamblerre commented Apr 16, 2020

I don't think that will be possible, sorry about that, @mlieberman85. We'll aim to get the fix out in gopls/v0.5.0, and I think that #38278 will be the ultimate fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.