x/tools/gopls: eagerly compute the workspace symbol index #52694
Labels
gopls/performance
Issues related to gopls performance (CPU, memory, etc).
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
This is a spin-off of #52602, which we're going to close as just an optiimization.
In the future, we should go one step further and populate the workspace symbol index at load time. There's a straightforward way to do this: while type-checking we always have access to the full AST of each package, before filtering. If we eagerly compute the symbol table at that time, it should be ~free.
However, I don't want to do this yet, because the cost of inheriting all these symbol handles on each generation is still too high, and our heuristic for which symbol handles to keep around is essentially "all of them", not just those that are reachable from workspace packages.
Once we have more control over snapshot data, we can re-consider this eager calculation.
The text was updated successfully, but these errors were encountered: