[Haskell-cafe] Compiling large code with old machine

Samuel Silva silva.samuel at gmail.com
Wed Jun 18 07:07:22 EDT 2008


Hello
On Tue, Jun 17, 2008 at 10:24 PM, Niels Aan de Brugh <nielsadb at gmail.com> wrote:
> On Tue, 2008-06-17 at 13:19 +0100, Samuel Silva wrote:
>>
>> I'm using GHC to compile around 700K of Haskell Code generated by HaXml.
>> How I compile this code.
>> My machine is Windows-XP(512MB RAM, 1.5GHz) running GHC-6.8.2.
>>
>> How much time it spend to compile this file?
>> I spent more than 1 hour and it doesn't finished.
>
> Just out of curiosity, is all that 700K just one big file or did you
> split it up into multiple files?

 It's just two big files with 700K each generated by DtdToHaskell from
 two big DTD files around 70K each.

> Are you using any "expensive" features? I'm not a GHC exert, but I'd
> expect things like type manipulations (e.g. phantom types) to be
> expensive (please correct me if this assumption is wrong).

 This large module only contains datatype declarations and instance classes
 for HTypeable, XmlContent, XmlAttributes and XmlAttrType.

> Bottom line: if compiling is so slow consider changing the code
> generator so the result is easier to process by GHC instead of fiddling
> with command line switches. Since you've chosen to generate the code it
> will probably change often and you'll run into this problem more than
> once.
>
> Regards,
> Niels
>
>

 Each Haskell file have almost 15000 lines. It is huge.
 It's compiling very fast(some minutes) using -H300m without cabal and
 -H200m with cabal.

 GHC it is amazing. This was a valuable help.

 --
 Don't hug that, Hugs ME!
 Samuel Silva


More information about the Haskell-Cafe mailing list