[GHC] #14594: 2 modules / 2500LOC takes nearly 3 minutes to build

GHC ghc-devs at haskell.org
Mon Dec 18 12:38:50 UTC 2017


#14594: 2 modules / 2500LOC takes nearly 3 minutes to build
-------------------------------------+-------------------------------------
           Reporter:  schyler        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  performance bug
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I tested this from a brand new MacBook 15" with 8 threads x 2.8 GHz Intel
 Core i7 / 16 GB RAM on OS X:
 {{{
 $ time stack build
 WARNING: /Users/kvanb/git/github-webhooks/github-webhooks.cabal was
 generated with a newer version of hpack, please upgrade and try again.
 github-webhooks-1.0.0: unregistering (local file changes: github-
 webhooks.cabal package.yaml spec/DecodeEventsSpec.hs spec/Spec.hs
 src/GitHub/Data/Webhooks...)
 github-webhooks-1.0.0: configure (lib)
 Configuring github-webhooks-1.0.0...
 github-webhooks-1.0.0: build (lib)
 Preprocessing library github-webhooks-1.0.0...
 [1 of 3] Compiling Paths_github_webhooks ( .stack-
 work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_github_webhooks.hs,
 .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Paths_github_webhooks.o )
 [2 of 3] Compiling GitHub.Data.Webhooks.Payload (
 src/GitHub/Data/Webhooks/Payload.hs, .stack-
 work/dist/x86_64-osx/Cabal-1.24.2.0/build/GitHub/Data/Webhooks/Payload.o )
 [3 of 3] Compiling GitHub.Data.Webhooks.Events (
 src/GitHub/Data/Webhooks/Events.hs, .stack-
 work/dist/x86_64-osx/Cabal-1.24.2.0/build/GitHub/Data/Webhooks/Events.o )
 github-webhooks-1.0.0: copy/register
 Installing library in
 /Users/kvanb/git/github-webhooks/.stack-
 work/install/x86_64-osx/lts-9.18/8.0.2/lib/x86_64-osx-ghc-8.0.2/github-
 webhooks-1.0.0-LDmeffpkXvwH6ZXCPE95ke
 Registering github-webhooks-1.0.0...

 real    2m49.342s
 user    2m42.441s
 sys     0m5.805s
 }}}


 Source code has about 30 derivations of the form:
 {{{#!hs
 type IssueState = Text

 data HookIssue = HookIssue
     { whIssueUrl                :: !URL
     , whIssueLabelsUrl          :: !URL
     , whIssueCommentsUrl        :: !URL
     , whIssueEventsUrl          :: !URL
     , whIssueHtmlUrl            :: !URL
     , whIssueId                 :: !Int
     , whIssueNumber             :: !Int
     , whIssueTitle              :: !Text
     , whIssueUser               :: !HookUser
     , whIssueLabels             :: !(Vector HookIssueLabels)
     , whIssueState              :: IssueState
     , whIssueIsLocked           :: !Bool
     , whIssueAssignee           :: !(Maybe HookUser)
     , whIssueMilestone          :: !(Maybe HookMilestone)
     , whIssueCommentCount       :: !Int
     , whIssueCreatedAt          :: !UTCTime
     , whIssueUpdatedAt          :: !UTCTime
     , whIssueClosedAt           :: !(Maybe UTCTime)
     , whIssueBody               :: !Text
     }
     deriving (Eq, Show, Typeable, Data, Generic)

 instance NFData HookIssue where rnf = genericRnf
 }}}

 Steps to reproduce
 1. clone https://github.com/onrock-eng/github-webhooks
 2. checkout sha 40a7ecc3a5845717055ee372b89e645a498cf1e2
 3. time stack build

 This is really ''really'' ''**really**'' slow.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14594>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list