diff options
author | Bartosz Nitka <niteria@gmail.com> | 2017-06-27 12:55:17 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-06-27 13:34:05 -0400 |
commit | b0708588e87554899c2efc80a2d3eba353dbe926 (patch) | |
tree | 03817b07a5c542a45d6058cf19a09efeaf5037bc /utils/check-ppr | |
parent | 6567c815135e93f8550d526f81d13f31c0cd92b6 (diff) | |
download | haskell-b0708588e87554899c2efc80a2d3eba353dbe926.tar.gz |
Make module membership on ModuleGraph faster
When loading/reloading with a large number of modules
(>5000) the cost of linear lookups becomes significant.
The changes here made `:reload` go from 6s to 1s on my
test case.
The bottlenecks were `needsLinker` in `DriverPipeline` and
`getModLoop` in `GhcMake`.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3646
Diffstat (limited to 'utils/check-ppr')
-rw-r--r-- | utils/check-ppr/Main.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/check-ppr/Main.hs b/utils/check-ppr/Main.hs index 47a95659ff..2fd44b2be0 100644 --- a/utils/check-ppr/Main.hs +++ b/utils/check-ppr/Main.hs @@ -77,7 +77,7 @@ parseOneFile libdir fileName = do _ <- load LoadAllTargets graph <- getModuleGraph let - modSum = case filter modByFile graph of + modSum = case filter modByFile (mgModSummaries graph) of [x] -> x xs -> error $ "Can't find module, got:" ++ show (map (ml_hs_file . ms_location) xs) |