summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-08-04 18:44:59 -0400
committerBen Gamari <ben@smart-cactus.org>2019-08-06 13:06:40 -0400
commit0c501d1987cb4bd01b8b55c2cdb07823f696dc65 (patch)
tree2f4cc06865b5b66f43dafaeaece1b391f9cff379
parent6e5dfcd2886d7523cfa059a64b343b22c5da4e97 (diff)
downloadhaskell-wip/iface-timings.tar.gz
Add timing on loadInterfacewip/iface-timings
AndreasK recently mentioned that he thought that interface file loading may be a non-trivial cost. Let's measure.
-rw-r--r--compiler/iface/LoadIface.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index 497ddfc179..16963dcb94 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -399,7 +399,8 @@ loadInterface doc_str mod from
-- Redo search for our local hole module
loadInterface doc_str (mkModule (thisPackage dflags) (moduleName mod)) from
| otherwise
- = do { -- Read the state
+ = withTiming getDynFlags (text "loading interface") (pure ()) $
+ do { -- Read the state
(eps,hpt) <- getEpsAndHpt
; gbl_env <- getGblEnv