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 github.com/aws/aws-sdk-go/service/ec2 #37450

Closed
heschi opened this issue Feb 25, 2020 · 5 comments
Closed
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

Comments

@heschi
Copy link
Contributor

heschi 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.

profile001

@muirdm @stamblerre

@heschi heschi added this to the gopls/v1.0.0 milestone Feb 25, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 25, 2020
@bmurphy1976
Copy link

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.

@heschi heschi modified the milestones: gopls/v1.0.0, gopls/v0.4.0 Feb 26, 2020
@gopherbot
Copy link

Change https://golang.org/cl/221021 mentions this issue: internal/lsp/source: speed up completion candidate formatting

@muirdm
Copy link

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
@mlieberman85
Copy link

Is there anything that can be done from a gopls config level while https://golang.org/cl/221021 is being worked on for gopls to ignore problematic packages like ec2?

@stamblerre
Copy link
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

No branches or pull requests

6 participants