Fwd: Is anything being done to remedy the soul crushing compile times of GHC?

Ben Gamari ben at smart-cactus.org
Wed Feb 17 20:21:02 UTC 2016


Thomas Tuegel <ttuegel at gmail.com> writes:

> On Wed, Feb 17, 2016 at 2:58 AM, Ben Gamari <ben at smart-cactus.org> wrote:
>> Yes, it would be great if someone could step up to look at Cabal's
>> performance. Running `cabal build` on an up-to-date tree of a
>> moderately-sized (10 kLoC, 8 components, 60 modules) Haskell project I
>> have laying around takes over 5 seconds from start-to-finish.
>>
>> `cabal build`ing just a single executable component takes 4 seconds.
>> This same executable takes 48 seconds for GHC to build from scratch with
>> optimization and 12 seconds without.
>
> I have contributed several performance patches to Cabal in the past,
> so I feel somewhat qualified to speak here. The remaining slowness in
> `cabal build` is mostly due to the pre-process phase. There work in
> progress which may improve this situation. We could also look at
> separating the pre-process phase from the build phase. (It seems odd
> to call it `pre-process` when it is *always* run during the build
> phase, doesn't it?) This has the advantage of sidestepping the
> slowness issue entirely, but it may break some users' workflows. Is
> that trade-off worth it? We could use user feedback here.
>
What exactly does the pre-process phase do, anyways?

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160217/0501c79f/attachment.sig>


More information about the ghc-devs mailing list