memory performance problem when compiling lots of derived instances in a single file
I'm playing with deriving Data/Typeable
for the GHC AST types (you'll need a recent HEAD for the standalone deriving fixes #2378 (closed), and I've got to use the generics-internal CPP tricks to work around #2433 (closed)).
After getting the first compiler-complaint-free version of the instances source, self-same compiler went away and tried to get all the memory it could find (I had to kill the process). After splitting the source into two, one importing the other, there is no problem loading them anymore.
-
Instances.hs
importsInstances0.hs
: loadingInstances
intoGHCi, version 6.9.20080709
works fine. -
All.hs
merges the source ofInstances
andInstances0
into a single module: trying to loadAll
intoGHCi, version 6.9.20080709
consumes memory like crazy.
Compiling All.hs
shouldn't behave like this in the first place, but if just splitting the file into two helps, the compiler should be able to do the split implicitly (sparing me the manual dependency analysis).
Trac metadata
Trac field | Value |
---|---|
Version | 6.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |