-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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/analysis: lazily resolve the import map
In CL 613715, we made import lookup lazy to mitigate the quadratic construction of the import map during type checking. This CL makes the equivalent change for the analysis driver. Since analysis does not have fine-grained invalidation, it is even more susceptible to the performance cost of this quadratic operation: DiagnosePackageFiles-64 │ before.txt │ after.txt │ │ sec/op │ sec/op vs base │ 1691.6m ± ∞ ¹ 693.6m ± ∞ ¹ -59.00% (p=0.008 n=5) │ before.txt │ after.txt │ │ cpu_seconds/op │ cpu_seconds/op vs base │ 6.480 ± ∞ ¹ 3.260 ± ∞ ¹ -49.69% (p=0.008 n=5) For golang/go#53275 Change-Id: I8690bc85848fe1e36391d4622aa2e3d3f9878f57 Reviewed-on: https://go-review.googlesource.com/c/tools/+/619095 Auto-Submit: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
- Loading branch information
Showing
4 changed files
with
45 additions
and
32 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