Skip to content

x/tools/gopls: don't insert transient syntax trees in parse cache #77030

Description

@adonovan

Split out from #76813 (comment):

[@findleyr] in typeCheckBatch.checkPackage, where we construct a syntax package, avoid inserting files into the parse cache if the package is not going to be persisted. We can do this either with a hint to the parseCache, or by avoid the parseCache entirely and just parsing directly.
The problem is that our parseCache uses time-based eviction, but when rediagnosing a large reverse cone there's a bunch of parsing that is entirely transient, and the time-based eviction policy leads to a very high water mark.
I think this is actually very straightforward to fix, and the cockroach example above is a good test case. I would like to fix it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/performanceIssues related to gopls performance (CPU, memory, etc).

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions