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: eagerly compute the workspace symbol index #52694

Open
findleyr opened this issue May 3, 2022 · 0 comments
Open

x/tools/gopls: eagerly compute the workspace symbol index #52694

findleyr opened this issue May 3, 2022 · 0 comments
Labels
gopls/performance gopls Tools
Milestone

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented May 3, 2022

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.

@findleyr findleyr added this to the gopls/on-deck milestone May 3, 2022
@gopherbot gopherbot added Tools gopls labels May 3, 2022
@findleyr findleyr added this to Backlog in Gopls Backlog May 10, 2022
@findleyr findleyr removed this from Backlog in Gopls Backlog May 10, 2022
@hyangah hyangah added the gopls/performance label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/performance gopls Tools
Projects
None yet
Development

No branches or pull requests

3 participants