-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High memory usage during compilation using GHC 8.0.2-rc2 #91
Comments
I've submitted GHC bug report, maybe leave this open until it's resolved: https://ghc.haskell.org/trac/ghc/ticket/13059 |
Wow, good catch! Not sure why so much memory is needed to compile this module. A few possibilities:
|
@mgsloan FYI GHC 8.0.2 has just been released so I expect to see this to pop up :) |
Yep, just hit this trying to build on an arm box with 2g of ram:
|
A likely culprit for the excessive memory usage has been identified in https://ghc.haskell.org/trac/ghc/ticket/13059#comment:20: Essentially, GHCs up to 8.0.2 had a bug that caused the INLINE pragma on The fix is to remove one "layer" of INLINE pragmas as shown in the comment. Apparently this shouldn't much affect performance, but it might be better to run some benchmarks to be safe. |
I'm building stack using GHC 8.0.2-rc2 and noticed
store
uses 5.17GB of (RSS) memory duringData.Store.Internal
compilation step. Using GHC 8.0.1 memory goes up to only 1.6GB.I haven't dug deeper, but something suspicious is going on.
You should be able to reproduce using installed Nix and executing
nix-build -A haskell.packages.ghc802.store '<nixpkgs>'
using recent channel.Building haddock for store also goes up to 5.8GB.
The text was updated successfully, but these errors were encountered: