forked from golang/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/cache: async pull diagnostics and joined analysis
Make pull diagnostics async, to optimize handling of many simultaneous requests for the diagnostics of open files. Accordingly, update the pull diagnostic benchmark to request diagnostics concurrently. Naively, these concurrent diagnostics would cause gopls to incur major performance penalty due to duplicate analyses -- as much as 5x total CPU in the pull diagnostic benchmark. To mitigate this cost, join ongoing analysis operations using a shared global transient futureCache. This reduces the benchmark back down close to its previous total CPU, with reduced latency. Eyeballing the net delta of this CL in the benchmark, it looks like +20% total CPU, -30% latency. As a nice side effect, this more than eliminates the need to pre-seed the file cache in the gopls marker tests. The shared futures provide more consolidation of work than the pre-seeding, because of variance in the cache keys of standard library packages, due to different gopls options. For golang/go#53275 Change-Id: Ie92bab4c140e3f86852531be8204b6574b254d8e Reviewed-on: https://go-review.googlesource.com/c/tools/+/622036 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
- Loading branch information
Showing
4 changed files
with
58 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters