#2438: memory performance problem when compiling lots of derived instances in a
single file
---------------------------------------------+------------------------------
    Reporter:  claus                         |       Owner:          
        Type:  compile-time performance bug  |      Status:  new     
    Priority:  normal                        |   Component:  Compiler
     Version:  6.9                           |    Severity:  normal  
    Keywords:                                |    Testcase:          
Architecture:  Unknown                       |          Os:  Unknown 
---------------------------------------------+------------------------------
 I'm playing with deriving `Data/Typeable` for the GHC AST types (you'll
 need a recent HEAD for the standalone deriving fixes #2378, and I've got
 to use the generics-internal CPP tricks to work around #2433).

 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` imports `Instances0.hs`: loading `Instances` into `GHCi,
 version 6.9.20080709` works fine.

 - `All.hs` merges the source of `Instances` and `Instances0` into a single
 module: trying to load `All` into `GHCi, 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).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2438>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to