Bring down compilation time of GHC.Hs.Instances
#18254 noted that there are long durations during the GHC build where we have no real parallelism. The longest such duration is when we are compiling the GHC.Hs.Instances
module. This module, which contains only Data.Data.Data
instances, takes over two minutes to compile. I think we should do one of the following:
- Split up the module (difficult due to #14482), or
- Compile it with
-O0
(which brings the compilation time from 140 seconds to 12 seconds), or - Figure out how to make the derived instances compile faster #9557
Given that these are just Data
instances I think that (2) is best (especially for the stage 1 build).
Edited by Ben Gamari