-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/performanceIssues related to gopls performance (CPU, memory, etc).Issues related to gopls performance (CPU, memory, etc).
Milestone
Description
Recent profiling has shown that, particularly on large codebases, snapshot cloning can significantly impact gopls' responsiveness.
Snapshot cloning is not optimized: there are lots of opportunities for performance improvement. For example:
- URI.Filename() is a huge source of unnecessary cost; almost all URI manipulations could be done directly with the URI string rather than converting to file paths (which involves URI parsing).
- Most of the maps in the snapshot could be replaced with an alternative data structure, optimized for fast cloning. For example, with an overlay that is occasionally compactified.
- The import graph doesn't need to be rebuilt from scratch.
- Known directories could be memoized.
- The explicit inheritance of cache keys could probably instead be achieved with an asynchronous sweep.
Not sure which of these we'll do. Filing this as an umbrella issue to track improving performance.
muirdm and bhcleek
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/performanceIssues related to gopls performance (CPU, memory, etc).Issues related to gopls performance (CPU, memory, etc).