GHC 6.10.2 consuming lots of memory while compiling - help?

Simon Marlow marlowsd at gmail.com
Mon Jul 27 08:17:44 EDT 2009


On 24/07/2009 23:01, Justin Bailey wrote:
> On Fri, Jul 24, 2009 at 2:51 PM, Don Stewart<dons at galois.com>  wrote:
>> jgbailey:
>>> On Fri, Jul 24, 2009 at 2:02 PM, Don Stewart<dons at galois.com>  wrote:
>>>> Oh, and I note you're not using -O or -O2 either?
>>>>
>>>> -- Don
>>>>
>>>
>>> This is a compile time problem, wouldn't -O make it worse?
>>
>> Almost certainly!
>>
 > Ironically adding -O does reduce the compile time in this case. I
 > shouldn't have been so quick to reply!
 >

-O may reduce compilation time by simplifying the code.  It's rare in 
practice, but more likely to happen when you're dealing with a lot of 
automatically-generated code.

To answer the original question, there are various debugging options 
that will give you an idea of what GHC is up to: -ddump-rn-trace, 
-ddump-tc-trace -ddump-splices.  And +RTS -hT -RTS will give you a heap 
profile of GHC, which might provide more clues (though matching the 
profile with what GHC was doing at the time is mostly guesswork).

If you think there's something we ought to investigate here, please make 
a self-contained test case and attach it to a ticket.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list