Possible compile time regression in GHC 8

Sreenidhi Nair nair.sreenidhi at gmail.com
Thu Apr 21 18:37:26 UTC 2016


Hello Ben,

We were trying to get `record` working on ghc-8 when we observed this
issue. Nikita has kindly merged in our pull request which makes `record`
now work on ghc-8. These were the steps we followed to reproduce the issue
with cabal

|23:52:40| ~/ghc-8-TH :git clone
https://github.com/nikita-volkov/base-prelude
Cloning into 'base-prelude'...
|23:53:03| ~/ghc-8-TH :git clone https://github.com/nikita-volkov/record
Cloning into 'record'...
|23:53:12| ~/ghc-8-TH :cd record
|23:53:15| ~/ghc-8-TH/record :cabal --version
cabal-install version 1.23.0.0
compiled using version 1.23.1.0 of the Cabal library
|23:53:19| ~/ghc-8-TH/record :ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.0.20160411
|23:53:23| ~/ghc-8-TH/record :cabal sandbox init
Writing a default package environment file to
/home/sreenidhi/ghc-8-TH/record/cabal.sandbox.config
Creating a new sandbox at /home/sreenidhi/ghc-8-TH/record/.cabal-sandbox
|23:53:26| ~/ghc-8-TH/record :cabal sandbox add-source ../base-prelude
|23:53:34| ~/ghc-8-TH/record :cabal install --dependencies-only

now doing a `cabal build` takes about 2.8 g memory and took nearly 3
minutes to complete. After switching to ghc 7.10.3

|23:43:49| ~/ghc-8-TH/record :cabal --version
cabal-install version 1.22.9.0
using version 1.22.8.0 of the Cabal library
|0:01:05| ~/ghc-8-TH/record :ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

`cabal build` took about 1.2g memory and completed in 1 minute 40 secs.
When -O0 option was passed the memory consumed was about the same in both 8
and 7.10.3 but time taken was nearly double for 8. These measurements were
roughly noted from `top` so may not be entirely accurate.

Please let me know if you need any further information.


On Thu, Apr 21, 2016 at 8:34 PM, Ben Gamari <ben at smart-cactus.org> wrote:

> Sreenidhi Nair <nair.sreenidhi at gmail.com> writes:
>
> > Hello,
> >
> > While compiling the `record` package with ghc-8 rc3 with `stack build`,
> the
> > memory usage went above 6gb and started trashing. But when `stack build
> > --fast` (-O0) was being used the package compiled with maximum memory at
> > 1.8gb.
> >
> Can you provide a reproduction case that does not rely on stack? As far
> as I can tell record has not been updated for GHC 8 (or even since 2015
> [1]).
>
> Cheers,
>
> - Ben
>
>
> [1] https://github.com/nikita-volkov/record
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160422/abe2bd25/attachment.html>


More information about the ghc-devs mailing list