Ticket #3829 (closed bug: worksforme)

Opened 3 years ago

Last modified 20 months ago

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 Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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

cabal install highlighting-kate-0.2.5.1 --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

Changed 3 years ago by igloo

  • milestone set to 6.14.1

Thanks for the report.

Changed 3 years ago by igloo

  • milestone changed from 7.0.1 to 7.0.2

Changed 2 years ago by igloo

  • milestone changed from 7.0.2 to 7.2.1

Changed 2 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.

Changed 22 months ago by igloo

  • status changed from new to closed
  • resolution set to worksforme

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).

Changed 20 months ago by slyfox

Likely a dup of #3664

Note: See TracTickets for help on using tickets.