x/tools/gopls: cache results of packages.Load #35968
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
@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 ofpackages.Load
for the second 2 requests, we just see that they are not yet cached and start loading. We should use theinternal/memoize
package for metadata requests so that the subsequent two requests can block, rather than perform redundant reloads.The text was updated successfully, but these errors were encountered: