checkFamInstConsistency dominates compile time
I'm looking into compile time issues on our internal code base.
checkFamInstConsistency takes 50% of all compile time for
ghci for us.
I've created a synthetic test case that approximates the issue and in which compiling 300 modules with one small data type each takes 65s total, and
checkFamInstConsistency is 87% of that and 94.1% of allocations.
checkFamInstConsistency is run to ensure consistency of a type family associated with Generics, but that's only semi-relevant.
./gen.sh ./inplace/bin/ghc-stage2 -keep-tmp-files DummyLevel3M100.hs
Profile with some relevant cost centres: https://phabricator.haskell.org/P150
I also plan to add this test case to the codebase.
|Component||Compiler (Type checker)|
|CC||RyanGlScott, ezyang, rwbarton, simonmar, simonpj|