This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance improvements for GetSpanInfo (#681)
* Performance improvements getSpanInfo was naively calling getDocumentations multiple times on the same name. Fixed by deduplicating these calls. getDocumentations is implemented on top of InteractiveEval.getDocs, which does a lot of Ghc setup internally and is very inefficient. Fixed by introducing a batch version of getDocs and batching all the calls in getSpanInfo name | success | samples | startup | setup | experiment | maxResidency ------------- | ------- | ------- | ------- | ----- | ---------- | ------------ edit (before) | True | 10 | 6.94s | 0.00s | 6.57s | 177MB edit (after) | True | 10 | 6.44s | 0.00s | 4.38s | 174MB * More performance improvements Played the deduplication trick on lookupName, which is slow for the same reasons as getDocs. Batching made a smaller difference in my measurements, so did not implement it * Fix redundant constraints * Skip the GHCi code paths for documentation We don't use the interactive module, so there's no reason to go through the GHCi code paths. Moreover, they apparently cause problems with ghc-lib. * Skip the GHCi paths for lookupName * Correctly load the module interface * Compatibility with GHC 8.4 and 8.6 * Fix ghc-lib build
- Loading branch information
1 parent
9272bfe
commit cbafcf2
Showing
7 changed files
with
166 additions
and
110 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
Oops, something went wrong.