Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#3829 closed bug (worksforme)

GHC leaks memory when compiling many files

Reported by: maltem Owned by:
Priority: normal Milestone: 7.2.1
Component: Compiler Version: 6.12.1
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Sorry for the rather imprecise bug report; also, I'm not sure if this is related to #3294 or #1334.

cabal install highlighting-kate- --enable-library-profiling --reinstall

On my machine, this takes a lot of memory: when passing 1.7G, I have to kill it. However, compilation of single modules from that package takes much fewer memory.

Change History (6)

comment:1 Changed 10 years ago by igloo

Milestone: 6.14.1

Thanks for the report.

comment:2 Changed 9 years ago by igloo


comment:3 Changed 9 years ago by igloo


comment:4 Changed 8 years ago by manzyuk

I might have a related issue. I have a project with 20+ files, and there is one main file that depends on many other files. Every time I load this file in GHCi, all its dependencies are (re)compiled. I am accustomed to running a GHCi session inside of Emacs and pressing C-c C-l to load the file after making a change to make sure that it compiles. I have noticed that after awhile my machine starts to feel sluggish, and top revealed high memory consumption by GHC. I have tested this outside of Emacs as well: by just starting GHCi and loading (not reloading) that file repeatedly I can grow the memory consumption of GHC from a few percents to 50 and more within a few minutes. I can provide more information if necessary. Just like the bug reporter, I am also using GHC 6.12.1 on a 64-bit Linux machine.

comment:5 Changed 8 years ago by igloo

Resolution: worksforme
Status: newclosed

I had a look a --make's memory usage a while ago, but it seemed that the problem was just all the unfoldings etc that it kept in memory (by design).

comment:6 Changed 8 years ago by slyfox

Likely a dup of #3664

Note: See TracTickets for help on using tickets.