Skip to content

Compilation time for the mime-string package blew up from 8.4 to 8.6

Summary

The mime-string Hackage package takes ~7 minutes to compile on my machine with a GHC >= 8.6. With GHC-8.4.4 it was building in < 20s including some dependencies.

Most of the time seems to be spent on the Codec.MIME.String.Headers and especially the Codec.MIME.String.Date module.

With GHC-8.10-HEAD, cabal seems to default to building to .dyn_o files too, which seems to increase compile time so much that building Codec.MIME.String.Headers alone takes > 20 minutes.

The issue was originally reported in this discourse.haskell.org thread.

Steps to reproduce

  1. Download T17516A.hs and T17516B.hs
  2. ghc -O T17516A.hs T17516B.hs

Expected behavior

The build should take no longer than about 30s.

Environment

  • GHC version used: 8.6.5
  • Operating System: Ubuntu 16.04
  • System Architecture: x86_64
Edited by Simon Jakobi
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information