2008/10/10 Thomas Schilling <[EMAIL PROTECTED]>:
> 2008/10/10 David Waern <[EMAIL PROTECTED]>:
>> I resorted to strictness annotations in the Interface structure since
>> I didn't want Haddock to pretty print everything.
>
> Do you think depSeq on GHC's output would help?  IIUC, Haddock
> processes each file immediately and only retains information in
> Interface files.

Yes, a deepSeq should be similar to my pretty printing approach,
shouldn't it? That's why I asked for NFData instances, to be able to
use Control.Parallel.Strategies.rnf.

I compared pretty printing against just using the strictness
annotations in Interface, just before pushing the latest patches, and
I think pretty printing took off ~50 M only. It's not much, but it's
worth experimenting with.

> So if you force the Interface file all unused
> Typechecker output can be discarded, no? I don't know how much memory
> Haddock's post-processing pass takes.  Maybe you could stop the GHC
> session before doing that.  Of course, we won't be able to get below
> GHC resident data + Haddock Interfaces.

Stopping the GHC session is a good idea.

We can get below GHC resident data + all Haddock Interfaces by writing
each Interface to disk directly when created, before the link creation
phase, then load only the data needed to build the link environment
from the Interface files, then for each Interface file: load it
entirely, rename it, render it to HTML and discard it :) But I don't
think it will be worth it.

To summarise, more experimentation is needed.

David

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to