Heap usage of GHC increased in 7.8 vs. 7.6

Simon Marlow marlowsd at gmail.com
Fri Apr 18 15:39:10 UTC 2014


I noticed that T1969 is failing again, and decided to do a little 
investigation.  The maximum residency when compiling T1969 with HEAD 
compared with 7.6.3 looks like this:

7.6.3: 10,473,920
HEAD:  13,783,536

This is with +RTS -h -i0.01 to avoid sampling errors as much as 
possible.  The figures are pretty accurate, and the heap profiles 
confirm it: we're using a lot more heap now.

-ddump-if-trace shows that HEAD is reading more interface files:

Renamer stats: 10 interfaces read
                6 type/class/variable imported, out of 1361 read
                0 instance decls imported, out of 105 read
                0 rule decls imported, out of 53 read

vs. with 7.6.3:

Renamer stats: 8 interfaces read
                2 type/class/variable imported, out of 828 read
                0 instance decls imported, out of 40 read
                0 rule decls imported, out of 45 read

The extra interface files are Control.Applicative and Control.Monad.  So 
the question is, why are we now reading these on *every* compilation? 
(T1969 imports only the Prelude).  Presumably this is something to do 
with the AMP warnings, but can't we lazily load these interfaces when 
they're needed?

Cheers,
Simon


More information about the ghc-devs mailing list