From 5ddb372746432ff0e1026f62171c1e0e3a705a6f Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Mon, 20 Oct 2008 11:12:57 +0000 Subject: Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). --- src/Haddock/Interface.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Haddock/Interface.hs b/src/Haddock/Interface.hs index 4835b08e..c8c03413 100644 --- a/src/Haddock/Interface.hs +++ b/src/Haddock/Interface.hs @@ -29,6 +29,7 @@ import qualified Data.Map as Map import Data.Map (Map) import Data.List import Control.Monad +import Control.Exception ( evaluate ) import GHC import Name @@ -148,6 +149,7 @@ processModule modsum flags modMap = dynflags let (interface, msg) = runWriter $ createInterface ghcMod flags modMap liftIO $ mapM_ putStrLn msg + liftIO $ evaluate interface return interface #else processModule :: Session -> ModSummary -> [Flag] -> ModuleMap -> IO Interface -- cgit v1.2.3