2 modules / 2500LOC takes nearly 3 minutes to build
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:
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
- clone https://github.com/onrock-eng/github-webhooks
- checkout sha 40a7ecc3a5845717055ee372b89e645a498cf1e2
- time stack build
This is really really **really** slow.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | kvanberendonck@gmail.com |
Operating system | |
Architecture |