-
Notifications
You must be signed in to change notification settings - Fork 27
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
Excessive memory usage when compiling with profiling enabled #31
Comments
Hi @dgaw , did you find out what was causing it? |
@Acentelles Unfortunately I didn't have time to investigate this. |
@dgaw I have found an ad-hoc fix for this situation. If you fix the type of require :: Configurable a => Config -> Name -> IO a to require :: Config -> Name -> IO Text -- per your example project
require = Data.Configurator.require then the memory explosion/simplifier ticks exhausted issue does not happen during compilation with |
Thanks @tdietert. I don't use configurator anymore but I'm sure your workaround will be helpful to others. |
I'm running into something that I think is related -- I'm getting this error when I enable profiling:
I created this little program to trigger the error:
If I reduce the number of fields to 13 or less, the error goes away. The datatype in my real application has 26 fields 😬. Adding the following definition suggested by @tdietert avoids the error! (In the example and in my app!)
|
Configurator seems to cause GHC 8.0.2 to allocate a huge amount of memory during compilation with profiling enabled, specifically:
stack build --profile
I've created an minimum example to demonstrate this:
https://github.com/dgaw/configurator-ghc-blowup
This example takes 6+ GB of RAM to compile and all it does is read 17 lines of a dummy config file.
The text was updated successfully, but these errors were encountered: