
#11380: Compiling a 10.000 line file exhausts memory -------------------------------------+------------------------------------- Reporter: kennethb | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * priority: high => normal Comment: Let's stick to the array-based parser since that's what the original issue was about. Then there's no problem compiling, either with or without optimizations. The problem is only with ghci for some reason. Trying with `-v`, there seems to be some major early difference when building with ghc vs. ghci. {{{ rwbarton@morphism:/tmp/pyn$ ghc-7.10.1 -fforce-recomp -c dist/build/Language/Python/Pyn/Parser/Parser.hs -O0 -ilib -idist/build -v -this-package-key pyn_4LeYrll2NJX6hY3DO8vvbp Glasgow Haskell Compiler, Version 7.10.1, stage 2 booted by GHC version 7.8.4 [...] *** Desugar: Result size of Desugar (after optimization) = {terms: 214,221, types: 3,864,905, coercions: 74,929} [... everything is fine] }}} {{{ rwbarton@morphism:/tmp/pyn$ ghci-7.10.1 dist/build/Language/Python/Pyn/Parser/Parser.hs -ilib -idist/build -v -this-package-key pyn_4LeYrll2NJX6hY3DO8vvbp [...] [10 of 10] Compiling Language.Python.Pyn.Parser.Parser ( dist/build/Language/Python/Pyn/Parser/Parser.hs, interpreted ) *** Parser: *** Renamer/typechecker: *** Desugar: Result size of Desugar (after optimization) = {terms: 220,453, types: 414,293,970, coercions: 75,337} *** Simplifier: Result size of Simplifier iteration=1 = {terms: 220,516, types: 419,756,722, coercions: 577,145} Result size of Simplifier iteration=2 = {terms: 220,516, types: 419,756,722, coercions: 370,154} Result size of Simplifier = {terms: 220,514, types: 419,756,719, coercions: 370,206} *** Tidy Core: Result size of Tidy Core^CInterrupted. [here memory usage exploded] }}} What would cause this huge difference? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11380#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler