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: cache results of packages.Load #35968

Closed
stamblerre opened this issue Dec 4, 2019 · 2 comments
Closed

x/tools/gopls: cache results of packages.Load #35968

stamblerre opened this issue Dec 4, 2019 · 2 comments
Labels
Milestone

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Dec 4, 2019

@heschik has noticed that we often start running the same go/packages.Load call 3 times in parallel on VS Code starting up. This is likely because VS Code issues 3 requests, and rather than wait on the results of packages.Load for the second 2 requests, we just see that they are not yet cached and start loading. We should use the internal/memoize package for metadata requests so that the subsequent two requests can block, rather than perform redundant reloads.

@stamblerre stamblerre added this to the gopls v1.0 milestone Dec 4, 2019
@heschik

This comment has been minimized.

Copy link
Contributor

@heschik heschik commented Jan 22, 2020

I think this is obsoleted by the new whole-workspace load strategy.

@stamblerre

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Jan 22, 2020

Yes, agreed.

@stamblerre stamblerre closed this Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.