Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack takes too long to find out that there is no work to do #1235

Closed
sjakobi opened this issue Oct 26, 2015 · 30 comments
Closed

stack takes too long to find out that there is no work to do #1235

sjakobi opened this issue Oct 26, 2015 · 30 comments

Comments

@sjakobi
Copy link
Member

sjakobi commented Oct 26, 2015

Steps to reproduce:

$ cd stack
$ stack build
$ stack build --verbose

Expected:
Stack quickly realizes that there is no work to do and exits.

Actual:

Version 0.1.7.0, Git revision 7264ef6d99f19091f6521722aa620f4b59dba9e3 (dirty) (2415 commits) x86_64
2015-10-26 04:13:13.885705: [debug] Checking for project config at: /home/simon/src/stack/stack.yaml @(stack_FHzONQT9HI3ATX2xQH198L:Stack.Config src/Stack/Config.hs:554:9)
2015-10-26 04:13:13.885916: [debug] Loading project config file stack.yaml @(stack_FHzONQT9HI3ATX2xQH198L:Stack.Config src/Stack/Config.hs:577:13)
2015-10-26 04:13:13.887741: [debug] Run process: ldd /home/simon/.local/bin/stack @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:13.904957: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-10-26 04:13:13.927123: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-10-26 04:13:13.92793: [debug] Run process: ghc --info @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:13.993673: [debug] Run process: ghc --numeric-version @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:14.032049: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:14.0626: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:14.094419: [debug] Run process: locale -a @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:14.115801: [debug] Checking resolver: lts-3.7 @(stack_FHzONQT9HI3ATX2xQH198L:Stack.Build.Source src/Stack/Build/Source.hs:162:17)
2015-10-26 04:13:14.115972: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-10-26 04:13:14.139067: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-10-26 04:13:14.157555: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-10-26 04:13:14.726689: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-10-26 04:13:14.899557: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:14.98411: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/.stack/snapshots/x86_64-linux/lts-3.7/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:15.152178: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/src/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)
2015-10-26 04:13:15.197502: [debug] Ignoring package iso8601-time, from (InstalledTo Local,"/home/simon/src/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/pkgdb/"), due to  it being unknown to the resolver / extra-deps. @(stack_FHzONQT9HI3ATX2xQH198L:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2015-10-26 04:13:15.198028: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-10-26 04:13:15.71894: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-10-26 04:13:15.719419: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)
2015-10-26 04:13:16.263889: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_FHzONQT9HI3ATX2xQH198L:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)
2015-10-26 04:13:16.415685: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_FHzONQT9HI3ATX2xQH198L:System.Process.Read src/System/Process/Read.hs:272:3)

This takes about 2.6s on my machine. Among other things stack decodes ~/.stack/indices/Hackage/00-index.cache three times which accounts for about 1.6s.

Is all this work really necessary to discover that there is no building to be done?

@borsboom
Copy link
Contributor

borsboom commented Nov 1, 2015

We have a project currently underway to profile and optimize this case. Ping @drwebb.

@borsboom borsboom added this to the P1: Must milestone Nov 1, 2015
@drwebb
Copy link
Contributor

drwebb commented Nov 10, 2015

Yes, at least one of the calls in this case have been eliminated by a recent commit I made.=. Eliminating the other would mean changing the behavior of how a call to the withCabalLoader function works.

λ church stack → λ git master* → stack build --verbose                                                                                                                                                    [7.10.2]
Version 0.1.7.0, Git revision e7d28e412146c9de2afd244779cb36ce97516f9c (dirty) (2548 commits) x86_64
2015-11-10 15:55:45.325635: [debug] Checking for project config at: /home/twebb/src/fpcomplete/stack/stack.yaml @(stack_HkplmoJrUgzABAqObuOfsF:Stack.Config src/Stack/Config.hs:555:9)
2015-11-10 15:55:45.325814: [debug] Loading project config file stack.yaml @(stack_HkplmoJrUgzABAqObuOfsF:Stack.Config src/Stack/Config.hs:578:13)
2015-11-10 15:55:45.327113: [debug] Run process: ldd /home/twebb/bin/stack @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.337348: [debug] Trying to decode /home/twebb/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2015-11-10 15:55:45.343902: [debug] Success decoding /home/twebb/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2015-11-10 15:55:45.343989: [debug] Trying to decode /home/twebb/.stack/indices/Hackage/00-index.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2015-11-10 15:55:45.507915: [debug] Success decoding /home/twebb/.stack/indices/Hackage/00-index.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2015-11-10 15:55:45.521841: [debug] Run process: ghc --info @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.613216: [debug] Run process: ghc --numeric-version @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.637280: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.659531: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.687843: [debug] Checking resolver: lts-3.7 @(stack_HkplmoJrUgzABAqObuOfsF:Stack.Build.Source src/Stack/Build/Source.hs:162:17)
2015-11-10 15:55:45.687970: [debug] Trying to decode /home/twebb/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2015-11-10 15:55:45.692809: [debug] Success decoding /home/twebb/.stack/build-plan-cache/x86_64-linux/lts-3.7.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2015-11-10 15:55:45.829156: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.854661: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/twebb/.stack/snapshots/x86_64-linux/lts-3.7/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.967086: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/twebb/src/fpcomplete/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)
2015-11-10 15:55:45.985879: [debug] Trying to decode /home/twebb/.stack/indices/Hackage/00-index.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2015-11-10 15:55:46.150551: [debug] Success decoding /home/twebb/.stack/indices/Hackage/00-index.cache @(stack_HkplmoJrUgzABAqObuOfsF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2015-11-10 15:55:46.225291: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_HkplmoJrUgzABAqObuOfsF:System.Process.Read src/System/Process/Read.hs:273:3)

@sjakobi
Copy link
Member Author

sjakobi commented Feb 6, 2016

Keeping track of the progress:

What took 2.6s with v0.1.7, takes 1.8s with v1.0.2 on the same machine:

~/s/stack (master) $ /usr/bin/stack build -v
Version 1.0.2, Git revision fa09a980d8bb3df88b2a9193cd9bf84cc6c419b3 (3084 commits) x86_64
2016-02-06 12:13:00.968437: [debug] Checking for project config at: /home/simon/src/stack/stack.yaml @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Config src/Stack/Config.hs:660:9)
2016-02-06 12:13:00.968781: [debug] Loading project config file stack.yaml @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Config src/Stack/Config.hs:683:13)
2016-02-06 12:13:00.970310: [debug] Run process: ldd /usr/bin/stack @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:00.986974: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.0.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-02-06 12:13:01.008720: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.0.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-02-06 12:13:01.010029: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-02-06 12:13:01.334838: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-02-06 12:13:01.363160: [debug] Run process: ghc --info @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:01.419759: [debug] Run process: ghc --numeric-version @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:01.676279: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:01.709064: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:01.754336: [debug] Checking resolver: lts-5.0 @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Build.Source src/Stack/Build/Source.hs:164:17)
2016-02-06 12:13:01.754548: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.0.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-02-06 12:13:01.769802: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.0.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-02-06 12:13:02.052956: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:02.122991: [debug] Ignoring package haskeline due to wanting version 0.7.2.2 instead of 0.7.2.1 @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-02-06 12:13:02.123578: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-02-06 12:13:02.123718: [debug] Ignoring package Cabal due to wanting version 1.22.7.0 instead of 1.22.5.0 @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-02-06 12:13:02.123982: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/.stack/snapshots/x86_64-linux/lts-5.0/7.10.3/pkgdb dump --expand-pkgroot @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:02.299277: [debug] Ignoring package path-io, from (InstalledTo Snap,"/home/simon/.stack/snapshots/x86_64-linux/lts-5.0/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_72HBrR2DYgnIr2orug5zeJ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-02-06 12:13:02.304582: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/src/stack/.stack-work/install/x86_64-linux/lts-5.0/7.10.3/pkgdb dump --expand-pkgroot @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)
2016-02-06 12:13:02.331125: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-02-06 12:13:02.634371: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_72HBrR2DYgnIr2orug5zeJ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-02-06 12:13:02.766327: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_72HBrR2DYgnIr2orug5zeJ:System.Process.Read src/System/Process/Read.hs:269:3)

I haven't had a look at the circumstances when the Hackage index is decoded, but I think that we should try to eleminate these calls when they aren't strictly needed.

@drwebb
Copy link
Contributor

drwebb commented Feb 18, 2016

@sjakobi Thanks for keeping track, I agree that the decodes are worth looking into optimizing. I'm not sure at the moment which ones can be skipped. I'll mark it on my TODO to look for some low-hanging fruit in these functions this week.

@mgsloan
Copy link
Contributor

mgsloan commented Mar 9, 2016

I believe #1892 will speed this up by 30% (0.3 seconds on my machine, total no-op stack build on itself is 1 second)

@sjakobi
Copy link
Member Author

sjakobi commented Mar 9, 2016

I believe #1892 will speed this up by 30% (0.3 seconds on my machine, total no-op stack build on itself is 1 second)

1.2s on my machine! A solid 33% improvement from 1.8s before!

$ stack build -v
Version 1.0.5, Git revision dd6fb848e55876dca8c737bf517316547249b8ee (dirty) (3294 commits) x86_64
2016-03-09 20:01:00.048411: [debug] Checking for project config at: /home/simon/src/stack/stack.yaml @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Config src/Stack/Config.hs:764:9)
2016-03-09 20:01:00.048721: [debug] Loading project config file stack.yaml @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Config src/Stack/Config.hs:782:13)
2016-03-09 20:01:00.050149: [debug] Checking whether stack was built with libgmp4 @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Config src/Stack/Config.hs:315:5)
2016-03-09 20:01:00.050305: [debug] Run process: ldd /home/simon/.local/bin/stack @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:00.062194: [debug] Stack was not build with libgmp4 @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Config src/Stack/Config.hs:319:14)
2016-03-09 20:01:00.062607: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.3.cache @(stack_H2uuVvppPbeAJ1uiFxrFbt:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-03-09 20:01:00.078171: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.3.cache @(stack_H2uuVvppPbeAJ1uiFxrFbt:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-03-09 20:01:00.078994: [debug] Getting system compiler version @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Setup src/Stack/Setup.hs:335:17)
2016-03-09 20:01:00.079179: [debug] Run process: ghc --info @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:00.105237: [debug] Asking GHC for its version @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Setup.Installed src/Stack/Setup/Installed.hs:91:13)
2016-03-09 20:01:00.105403: [debug] Run process: ghc --numeric-version @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:00.142498: [debug] Getting Cabal package version @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-03-09 20:01:00.142703: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:00.170299: [debug] Resolving package entries @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Setup src/Stack/Setup.hs:223:5)
2016-03-09 20:01:00.173235: [debug] Getting global package database location @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-03-09 20:01:00.173466: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:00.210798: [debug] Checking resolver: lts-5.3 @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Build.Source src/Stack/Build/Source.hs:166:17)
2016-03-09 20:01:00.210994: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.3.cache @(stack_H2uuVvppPbeAJ1uiFxrFbt:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-03-09 20:01:00.229543: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.3.cache @(stack_H2uuVvppPbeAJ1uiFxrFbt:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-03-09 20:01:00.241150: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_H2uuVvppPbeAJ1uiFxrFbt:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-03-09 20:01:00.589959: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_H2uuVvppPbeAJ1uiFxrFbt:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-03-09 20:01:00.891059: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:00.954155: [debug] Ignoring package haskeline due to wanting version 0.7.2.2 instead of 0.7.2.1 @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-03-09 20:01:00.954359: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-03-09 20:01:00.954550: [debug] Ignoring package Cabal due to wanting version 1.22.7.0 instead of 1.22.5.0 @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-03-09 20:01:00.954836: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/.stack/snapshots/x86_64-linux/lts-5.3/7.10.3/pkgdb dump --expand-pkgroot @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:01.086143: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/src/stack/.stack-work/install/x86_64-linux/lts-5.3/7.10.3/pkgdb dump --expand-pkgroot @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)
2016-03-09 20:01:01.260060: [debug] Getting global package database location @(stack_H2uuVvppPbeAJ1uiFxrFbt:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-03-09 20:01:01.260201: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_H2uuVvppPbeAJ1uiFxrFbt:System.Process.Read src/System/Process/Read.hs:269:3)

@sjakobi
Copy link
Member Author

sjakobi commented Jul 6, 2016

Here are some timings with stack-1.1.2, mostly because I recently discovered the awesome bench tool:

This rebuilds stack at the revision of the timings above:

~/s/stack ((dd6fb84...)) $ bench "/usr/bin/stack build"
benchmarking /usr/bin/stack build
time                 1.432 s    (1.204 s .. 1.754 s)
                     0.994 R²   (0.983 R² .. 1.000 R²)
mean                 1.315 s    (1.264 s .. 1.356 s)
std dev              63.84 ms   (0.0 s .. 70.74 ms)
variance introduced by outliers: 19% (moderately inflated)

Debug output:

~/s/stack ((dd6fb84...)) $ /usr/bin/stack -v build 
Version 1.1.2, Git revision cebe10e845fed4420b6224d97dcabf20477bbd4b (3646 commits) x86_64 hpack-0.14.0
2016-07-06 16:57:10.402321: [debug] Checking for project config at: /home/simon/src/stack/stack.yaml @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Config src/Stack/Config.hs:811:9)
2016-07-06 16:57:10.403235: [debug] Loading project config file stack.yaml @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Config src/Stack/Config.hs:829:13)
2016-07-06 16:57:10.406298: [debug] Checking whether stack was built with libgmp4 @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Config src/Stack/Config.hs:326:5)
2016-07-06 16:57:10.406541: [debug] Run process: ldd /usr/bin/stack @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:10.423614: [debug] Stack was not built with libgmp4 @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Config src/Stack/Config.hs:330:14)
2016-07-06 16:57:10.424109: [debug] Trying to decode /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.3.cache @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-07-06 16:57:10.454545: [debug] Success decoding /home/simon/.stack/build-plan-cache/x86_64-linux/lts-5.3.cache @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-07-06 16:57:10.455019: [debug] Getting system compiler version @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Setup src/Stack/Setup.hs:341:17)
2016-07-06 16:57:10.455254: [debug] Run process: ghc --info @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:10.480868: [debug] Asking GHC for its version @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Setup.Installed src/Stack/Setup/Installed.hs:94:13)
2016-07-06 16:57:10.481053: [debug] Run process: ghc --numeric-version @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:10.518256: [debug] Getting Cabal package version @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-07-06 16:57:10.518445: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:10.541740: [debug] Resolving package entries @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Setup src/Stack/Setup.hs:221:5)
2016-07-06 16:57:10.543460: [debug] Getting global package database location @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-07-06 16:57:10.543788: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:10.935355: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:10.989043: [debug] Ignoring package Cabal due to wanting version 1.22.7.0 instead of 1.24.0.0 @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-07-06 16:57:10.989688: [debug] Ignoring package haskeline due to wanting version 0.7.2.2 instead of 0.7.2.1 @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-07-06 16:57:10.989796: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-07-06 16:57:10.989941: [debug] Ignoring package Cabal due to wanting version 1.22.7.0 instead of 1.22.5.0 @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-07-06 16:57:10.990178: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/.stack/snapshots/x86_64-linux/lts-5.3/7.10.3/pkgdb dump --expand-pkgroot @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:11.114545: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/simon/src/stack/.stack-work/install/x86_64-linux/lts-5.3/7.10.3/pkgdb dump --expand-pkgroot @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-06 16:57:11.152836: [debug] Trying to decode /home/simon/.stack/indices/Hackage/00-index.cache @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-07-06 16:57:11.492131: [debug] Success decoding /home/simon/.stack/indices/Hackage/00-index.cache @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-07-06 16:57:11.550268: [debug] Getting global package database location @(stack_K1e6VSKnzs1HNYmTJGAgTQ:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-07-06 16:57:11.550512: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_K1e6VSKnzs1HNYmTJGAgTQ:System.Process.Read src/System/Process/Read.hs:283:3)

My current development version is slightly faster, probably mostly due to store:

~/s/stack ((dd6fb84...)) $ bench "stack build"
benchmarking stack build
time                 1.190 s    (1.046 s .. 1.403 s)
                     0.996 R²   (0.989 R² .. 1.000 R²)
mean                 1.225 s    (1.193 s .. 1.254 s)
std dev              47.61 ms   (0.0 s .. 49.91 ms)
variance introduced by outliers: 19% (moderately inflated)

@hesselink
Copy link
Contributor

Thanks for keeping an eye on this! The 'no work' build of our project takes a little over 5 seconds on my (relatively beefy) machine, which is definitely noticeable. Are you interested in any logs/output of that?

@sjakobi
Copy link
Member Author

sjakobi commented Jul 7, 2016

a little over 5 seconds

Oh!

Are you interested in any logs/output of that?

Yes! The debug log such a run would be interesting to me. Depending on size you could possibly put it in a Gist.

The stack.yaml would of course also be interesting, but you might not be able to share that.

@hesselink
Copy link
Contributor

Yes! The debug log such a run would be interesting to me. Depending on size you could possibly put it in a Gist.

It's not that big, I'll put it at the bottom.

The stack.yaml would of course also be interesting, but you might not be able to share that.

The stack.yaml and snapshot I'm not sure that I can share, but I can at least describe them: the stack.yaml has 123 normal packages and 11 more that are marked as extra-dep. The resolver is a custom snapshot with 257 listed package versions, GHC 7.10, and 14 flags set for 11 packages.

This is on a mac (OS X 10.10.5). Let me know if there's anything else that would help.

$ stack build -v
Version 1.1.2 x86_64 hpack-0.14.0
2016-07-07 12:00:34.389392: [debug] Checking for project config at: /Users/erik/Documents/typlab/product/server/stack.yaml @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Config src/Stack/Config.hs:811:9)
2016-07-07 12:00:34.390148: [debug] Checking for project config at: /Users/erik/Documents/typlab/product/stack.yaml @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Config src/Stack/Config.hs:811:9)
2016-07-07 12:00:34.390225: [debug] Loading project config file /Users/erik/Documents/typlab/product/stack.yaml @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Config src/Stack/Config.hs:829:13)
2016-07-07 12:00:34.392953: [debug] Loading file://silk-snapshot.yaml build plan @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.BuildPlan src/Stack/BuildPlan.hs:961:5)
2016-07-07 12:00:34.396141: [debug] Trying to decode /Users/erik/.stack/indices/Hackage/00-index.cache @(stack_JAcs0EuAGbK5rtqRdoxQaL:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-07-07 12:00:34.579510: [debug] Success decoding /Users/erik/.stack/indices/Hackage/00-index.cache @(stack_JAcs0EuAGbK5rtqRdoxQaL:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-07-07 12:00:34.887556: [debug] Getting system compiler version @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Setup src/Stack/Setup.hs:341:17)
2016-07-07 12:00:34.887868: [debug] Run process: ghc --info @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:34.934225: [debug] Asking GHC for its version @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Setup.Installed src/Stack/Setup/Installed.hs:94:13)
2016-07-07 12:00:34.934319: [debug] Run process: ghc --numeric-version @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:34.970854: [debug] Getting Cabal package version @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-07-07 12:00:34.970964: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:34.992753: [debug] Resolving package entries @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Setup src/Stack/Setup.hs:221:5)
2016-07-07 12:00:34.998525: [debug] Getting global package database location @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-07-07 12:00:34.998622: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:39.102809: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:39.138255: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/erik/.stack/snapshots/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:39.266317: [debug] Ignoring package ekg-statsd, from (InstalledTo Snap,"/Users/erik/.stack/snapshots/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb/"), due to wrong location: (Just (InstalledTo Snap),Local) @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-07-07 12:00:39.268089: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/erik/Documents/typlab/product/.stack-work/install/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:39.427711: [debug] Getting global package database location @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-07-07 12:00:39.427878: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)

@sjakobi
Copy link
Member Author

sjakobi commented Jul 7, 2016

Thanks!

This 4s hole in the log is quite curious: :)

2016-07-07 12:00:34.998622: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-07-07 12:00:39.102809: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)

I guess we'll have to improve the logging there.

@hesselink
Copy link
Contributor

Yes, I tried manually running the ghc-pkg command, but that only takes about 0.9s, so it's not the full 4s.

@sjakobi
Copy link
Member Author

sjakobi commented Jul 8, 2016

@hesselink: In #2351 I've added a few more logging statements which should give us a some insights into that gap in the logs. If you want, you can install the current HEAD version of stack with stack upgrade --git. I would recommend against running it on your workstation though, as that would invalidate some cache files with the effect of rebuilding all your extra-deps and probably your entire application.

I don't feel any time pressure on this though, so you can also simply wait for the next release.

Based on my own logs, my hypothesis is that those 4 seconds are spent parsing the cabal files in your 134 packages. This currently happens twice on each run of stack but should be fixed when #2326 is merged.

I think we should also consider parsing these cabal files concurrently.

@sjakobi
Copy link
Member Author

sjakobi commented Jul 8, 2016

I think we should also consider parsing these cabal files concurrently.

Addressed in #2352.

@mgsloan mgsloan modified the milestones: P2: Should, Stabilization Jul 26, 2016
@sjakobi
Copy link
Member Author

sjakobi commented Sep 29, 2016

@hesselink: Now that v1.2.0 is out, could you post another debug log of a no-op build of your large project?

@hesselink
Copy link
Contributor

Sure! There doesn't seem to be much improvement, but perhaps there's more details in the logs now. Since I'm on a different machine, I've done a build with 1.1.2 and 1.2.0:

$ stack build -v
Version 1.1.2, Git revision cebe10e845fed4420b6224d97dcabf20477bbd4b (3646 commits) x86_64 hpack-0.14.0
2016-09-30 09:51:37.052873: [debug] Checking for project config at: /Users/ehesselink/Documents/silk/product/stack.yaml @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Config src/Stack/Config.hs:811:9)
2016-09-30 09:51:37.053640: [debug] Loading project config file stack.yaml @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Config src/Stack/Config.hs:829:13)
2016-09-30 09:51:37.056602: [debug] Loading file://silk-snapshot.yaml build plan @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.BuildPlan src/Stack/BuildPlan.hs:961:5)
2016-09-30 09:51:37.059526: [debug] Trying to decode /Users/ehesselink/.stack/indices/Hackage/00-index.cache @(stack_JAcs0EuAGbK5rtqRdoxQaL:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-09-30 09:51:37.267195: [debug] Success decoding /Users/ehesselink/.stack/indices/Hackage/00-index.cache @(stack_JAcs0EuAGbK5rtqRdoxQaL:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-09-30 09:51:37.666722: [debug] Getting system compiler version @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Setup src/Stack/Setup.hs:341:17)
2016-09-30 09:51:37.668866: [debug] Asking GHC for its version @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Setup.Installed src/Stack/Setup/Installed.hs:94:13)
2016-09-30 09:51:37.668980: [debug] Run process: ghc --numeric-version @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-09-30 09:51:37.716795: [debug] Getting Cabal package version @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.GhcPkg src/Stack/GhcPkg.hs:165:5)
2016-09-30 09:51:37.717090: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-09-30 09:51:37.746089: [debug] Resolving package entries @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.Setup src/Stack/Setup.hs:221:5)
2016-09-30 09:51:37.752859: [debug] Getting global package database location @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-09-30 09:51:37.752933: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-09-30 09:51:44.439121: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-09-30 09:51:44.486953: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/ehesselink/.stack/snapshots/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-09-30 09:51:44.617127: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/ehesselink/Documents/silk/product/.stack-work/install/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)
2016-09-30 09:51:44.854038: [debug] Getting global package database location @(stack_JAcs0EuAGbK5rtqRdoxQaL:Stack.GhcPkg src/Stack/GhcPkg.hs:48:5)
2016-09-30 09:51:44.854158: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_JAcs0EuAGbK5rtqRdoxQaL:System.Process.Read src/System/Process/Read.hs:283:3)

$ stack build -v
Version 1.2.0 x86_64 hpack-0.14.0
2016-09-30 10:26:41.200693: [debug] Checking for project config at: /Users/ehesselink/Documents/silk/product/stack.yaml
@(Stack/Config.hs:792:9)
2016-09-30 10:26:41.201450: [debug] Loading project config file stack.yaml
@(Stack/Config.hs:810:13)
2016-09-30 10:26:41.204517: [debug] Loading file://silk-snapshot.yaml build plan
@(Stack/BuildPlan.hs:965:5)
2016-09-30 10:26:41.207588: [debug] Trying to decode /Users/ehesselink/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:68:5)
2016-09-30 10:26:41.304278: [debug] Success decoding /Users/ehesselink/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:72:13)
2016-09-30 10:26:41.793157: [debug] Getting system compiler version
@(Stack/Setup.hs:354:17)
2016-09-30 10:26:41.794919: [debug] Using standard GHC build
@(Stack/Setup.hs:535:9)
2016-09-30 10:26:41.795348: [debug] Getting global package database location
@(Stack/GhcPkg.hs:54:5)
2016-09-30 10:26:41.795601: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:41.796471: [debug] Getting Cabal package version
@(Stack/GhcPkg.hs:171:5)
2016-09-30 10:26:41.796770: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:41.797450: [debug] Asking GHC for its version
@(Stack/Setup/Installed.hs:101:13)
2016-09-30 10:26:41.797788: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc --numeric-version
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:41.841125: [debug] Process finished in 44 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:41.841606: [debug] Process finished in 45 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:41.860128: [debug] Process finished in 62 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc --numeric-version
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:41.860314: [debug] Resolving package entries
@(Stack/Setup.hs:234:5)
2016-09-30 10:26:41.866788: [debug] Starting to execute command inside EnvConfig
@(Stack/Runners.hs:166:18)
2016-09-30 10:26:41.866870: [debug] Parsing the cabal files of the local packages
@(Stack/Build/Source.hs:282:5)
2016-09-30 10:26:42.138856: [debug] Parsing the targets
@(Stack/Build/Source.hs:219:5)
2016-09-30 10:26:43.862739: [debug] Exception ignored when attempting to load /Users/ehesselink/Documents/silk/product/server/forks/packunused/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/ehesselink/Documents/silk/product/server/forks/packunused/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2016-09-30 10:26:44.208826: [warn] Warning: File listed in server/forks/postgresql-simple/postgresql-simple.cabal file does not exist: CHANGELOG.md
@(Stack/Package.hs:1216:8)
2016-09-30 10:26:47.971247: [debug] Exception ignored when attempting to load /Users/ehesselink/Documents/silk/product/server/forks/stylish-haskell/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/ehesselink/Documents/silk/product/server/forks/stylish-haskell/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2016-09-30 10:26:48.257701: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:73:5)
2016-09-30 10:26:48.258106: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.293551: [debug] Process finished in 35 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --global --no-user-package-db dump --expand-pkgroot
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.303397: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/ehesselink/.stack/snapshots/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.427172: [debug] Process finished in 123 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/ehesselink/.stack/snapshots/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.429220: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/ehesselink/Documents/silk/product/.stack-work/install/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.524859: [debug] Process finished in 95 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --user --no-user-package-db --package-db /Users/ehesselink/Documents/silk/product/.stack-work/install/x86_64-osx/custom-silk-2016-05_1-9Jhi8ZYyHeg9/7.10.3/pkgdb dump --expand-pkgroot
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.527006: [debug] Constructing the build plan
@(Stack/Build/ConstructPlan.hs:157:5)
2016-09-30 10:26:48.653936: [debug] Checking if we are going to build multiple executables with the same name
@(Stack/Build.hs:174:5)
2016-09-30 10:26:48.654190: [debug] Executing the build plan
@(Stack/Build/Execute.hs:359:5)
2016-09-30 10:26:48.655455: [debug] Getting global package database location
@(Stack/GhcPkg.hs:54:5)
2016-09-30 10:26:48.655531: [debug] Run process: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:277:3)
2016-09-30 10:26:48.684634: [debug] Process finished in 29 ms: /Users/ehesselink/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc-pkg --no-user-package-db list --global
@(System/Process/Read.hs:277:3)

@sjakobi
Copy link
Member Author

sjakobi commented Sep 30, 2016

Thanks for the logs!

Most of the time is spent in this bit:

2016-09-30 10:26:42.138856: [debug] Parsing the targets
@(Stack/Build/Source.hs:219:5)
2016-09-30 10:26:43.862739: [debug] Exception ignored when attempting to load /Users/ehesselink/Documents/silk/product/server/forks/packunused/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/ehesselink/Documents/silk/product/server/forks/packunused/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2016-09-30 10:26:44.208826: [warn] Warning: File listed in server/forks/postgresql-simple/postgresql-simple.cabal file does not exist: CHANGELOG.md
@(Stack/Package.hs:1216:8)
2016-09-30 10:26:47.971247: [debug] Exception ignored when attempting to load /Users/ehesselink/Documents/silk/product/server/forks/stylish-haskell/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: /Users/ehesselink/Documents/silk/product/server/forks/stylish-haskell/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/stack-build-cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2016-09-30 10:26:48.257701: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:73:5)

Not sure what exactly takes so much time there but we'll find out!

@sjakobi
Copy link
Member Author

sjakobi commented Sep 30, 2016

I'm seeing similar timings locally, when I build the amazonka project which contains 78 packages:

2016-09-30 22:40:50.012076: [debug] Parsing the targets
@(Stack/Build/Source.hs:219:5)
2016-09-30 22:41:09.799693: [debug] Finding out which packages are already installed
@(Stack/Build/Installed.hs:73:5)

mgsloan added a commit that referenced this issue Sep 30, 2016
+ colorize logging of timings
@mgsloan
Copy link
Contributor

mgsloan commented Sep 30, 2016

Looks like the time is spent in getPackageFiles. I've pushed a commit adding a bit of debug logging here. For stack itself, it takes half a second:

2016-09-30-163021_648x133_scrot

@sjakobi
Copy link
Member Author

sjakobi commented Oct 1, 2016

Looks like the time is spent in getPackageFiles.

Right, getPackageFiles seems to consume pretty much the entire gap between "Parsing the targets" and "Finding out which packages are already installed" for amazonka, too.

strace -f -tt -e read,open stack build -v shows that stack is reading (and presumably parsing) all the .dump-hi files of the local packages in that time, so maybe that's where the time is spent.

Profiling would probably tell me more but currently I can't get past #2655.

@sjakobi
Copy link
Member Author

sjakobi commented Oct 1, 2016

Here's the profiling summary for an amazonka "null build":

COST CENTRE                       MODULE          %time %alloc

parseAbsFile                      Path             18.7   22.7
collapseFilePath                  Path.Extra       15.0   19.1
parseDumpHI                       Stack.Package    14.9   36.2
liftD                             Path.IO           7.4    2.4
parseDumpHI.thDeps                Stack.Package     5.4    0.0
hasParentDir                      Path              4.6    0.0
fmap                              Data.Store.Core   3.0    1.5
compareText.go                    Data.Text         2.6    0.0
findCandidate.resolveCandidate    Stack.Package     1.6    2.0
findCandidate.makeDirCandidates.\ Stack.Package     1.1    1.7
<*>.\                             Data.Store.Core   1.1    0.6
>>=.\                             Data.Store.Core   1.0    0.7

(Here's the full .prof file)

Apparently nearly half of the time and allocations is spent on calls to parseCollapsedAbsFile from Stack.Package.findCandidates.resolveCandidate.

In addition to looking for optimizations in some of the functions above we could still consider processing packages concurrently, maybe a bit smarter than what I tried last time.

@sjakobi
Copy link
Member Author

sjakobi commented Oct 1, 2016

One thing I noticed is that most of the .dump-hi-files are read twice, e.g.

$ strace -tt -y -e read -P /home/simon/src/amazonka/test/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/src/Test/AWS/TH.dump-hi stack build -v
...
2016-10-01 09:49:34.773742: [debug] Start: getPackageFiles /home/simon/src/amazonka/test/amazonka-test.cabal
@(Stack/Package.hs:250:21)
09:49:34.782962 --- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
09:49:34.791193 read(10</home/simon/src/amazonka/test/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/src/Test/AWS/TH.dump-hi>, "\n==================== FINAL INTE"..., 36465) = 36465
09:49:34.792968 --- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
09:49:34.793967 read(10</home/simon/src/amazonka/test/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/src/Test/AWS/TH.dump-hi>, "\n==================== FINAL INTE"..., 36465) = 36465
2016-10-01 09:49:34.794575: [debug] Finished in 20ms: getPackageFiles /home/simon/src/amazonka/test/amazonka-test.cabal
@(Stack/Package.hs:250:21)
...

Maybe there's some potential for savings here.

@sjakobi
Copy link
Member Author

sjakobi commented Oct 1, 2016

Maybe there's some potential for savings here.

Yes, there was some! :)

@sjakobi
Copy link
Member Author

sjakobi commented Oct 1, 2016

Here's a new profile of a null build of the amazonka project:

COST CENTRE                       MODULE          %time %alloc

parseDumpHI                       Stack.Package    18.4   36.1
parseAbsFile                      Path             14.9   19.8
collapseFilePath                  Path.Extra       11.7   16.3
liftD                             Path.IO           6.2    2.1
parseDumpHI.thDeps                Stack.Package     4.5    0.0
hasParentDir                      Path              4.1    0.0
compareText.go                    Data.Text         4.1    0.0
fmap                              Data.Store.Core   4.0    2.4
<*>.\                             Data.Store.Core   1.6    0.9
>>=.\                             Data.Store.Core   1.5    1.1
resolveFile.f                     Path.IO           1.3    1.3
findCandidate.resolveCandidate    Stack.Package     1.0    1.7
normalizeDir                      Path              1.0    1.1
findCandidate.makeDirCandidates.\ Stack.Package     0.8    1.5
compareText.go.(...)              Data.Text         0.2    1.3
compareText.go.(...)              Data.Text         0.2    1.3

(Full .prof-file here)

I'm a bit suspicious about the collapseFilePath function. Is that combination of foldl (not foldl'!) and reverse really efficient?

@mgsloan
Copy link
Contributor

mgsloan commented Oct 1, 2016

Seems likely that there are indeed some savings to be had by modifying functions like collapseFilePath. Wouldn't have expected them to take so much cpu time / allocation.

I'd suggest modifying it in the way you suggest, use foldl', and maybe even entirely avoid the reverse by building it into the fold.

@sjakobi
Copy link
Member Author

sjakobi commented Oct 1, 2016

I'd suggest modifying it in the way you suggest, use foldl', and maybe even entirely avoid the reverse by building it into the fold.

I have tried to find a faster implementation for a bit but actually failed so far to make a noticeable difference.

Instead I believe we can speed up stack by making (much) fewer calls to collapseFilePath:

I've been looking at the Stack.Package.findCandidate function on the log-findcandidate branch for a bit.

Here's a snippet that shows the stat calls that happen during the execution of a single call to findCandidate (findCandidate is executed once for each .dump-hi file):

$ strace -tt -y -e stat stack build -v
....
2016-10-01 22:01:59.509174: [debug] findCandidate: ["/home/simon/src/amazonka/amazonka/src/","/home/simon/src/amazonka/amazonka/"] ["hs","hsc","lhs","gc","chs","hsc","x","y","ly","cpphs"] DotCabalModule (ModuleName ["Network","AWS","Internal","Body"])
@(Stack/Package.hs:1039:5)
22:01:59.509392 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2335, ...}) = 0
2016-10-01 22:01:59.509379: [debug] Reader contents: ("/home/simon/src/amazonka/amazonka/amazonka.cabal","/home/simon/src/amazonka/amazonka/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/")
@(Stack/Package.hs:1041:5)
22:01:59.509840 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.hs", {st_mode=S_IFREG|0664, st_size=4025, ...}) = 0
22:01:59.509917 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.hsc", 0x7fb19c2e4e80) = -1 ENOENT (No such file or directory)
22:01:59.509983 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.lhs", 0x7fb19c2361a0) = -1 ENOENT (No such file or directory)
22:01:59.510043 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.gc", 0x7fb19c2363d0) = -1 ENOENT (No such file or directory)
22:01:59.510103 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.chs", 0x7fb19c236600) = -1 ENOENT (No such file or directory)
22:01:59.510161 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.hsc", 0x7fb19c236840) = -1 ENOENT (No such file or directory)
22:01:59.510219 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.x", 0x7fb19c236a70) = -1 ENOENT (No such file or directory)
22:01:59.510278 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.y", 0x7fb19c236ca0) = -1 ENOENT (No such file or directory)
22:01:59.510468 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.ly", 0x7fb19c236ed0) = -1 ENOENT (No such file or directory)
22:01:59.510531 stat("/home/simon/src/amazonka/amazonka/src/Network/AWS/Internal/Body.cpphs", 0x7fb19a88b190) = -1 ENOENT (No such file or directory)
22:01:59.510589 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.hs", 0x7fb19a88b3d0) = -1 ENOENT (No such file or directory)
22:01:59.510646 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.hsc", 0x7fb19a88b5f0) = -1 ENOENT (No such file or directory)
22:01:59.510702 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.lhs", 0x7fb19a88b810) = -1 ENOENT (No such file or directory)
22:01:59.510758 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.gc", 0x7fb19a88ba30) = -1 ENOENT (No such file or directory)
22:01:59.510813 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.chs", 0x7fb19a88bc40) = -1 ENOENT (No such file or directory)
22:01:59.510869 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.hsc", 0x7fb19a88be60) = -1 ENOENT (No such file or directory)
22:01:59.510924 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.x", 0x7fb19c23f180) = -1 ENOENT (No such file or directory)
22:01:59.510980 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.y", 0x7fb19c23f3a0) = -1 ENOENT (No such file or directory)
22:01:59.511161 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.ly", 0x7fb19c23f5b0) = -1 ENOENT (No such file or directory)
22:01:59.511223 stat("/home/simon/src/amazonka/amazonka/Network/AWS/Internal/Body.cpphs", 0x7fb19c23f7d0) = -1 ENOENT (No such file or directory)
....

So, during each such call to findCandidates, 20 Path Abs Files are created with the relatively expensive parseCollapsedAbsFile and tested for existence.

For amazonka, these calls add up to ~35% of the total execution time of a null build.

I wonder why we don't simply create a list of the files in the package directory before the call and find the one that matches Network/AWS/Internal/Body\.{exts}?! At least we could pass on creating the Path Abs File and check existence with the collapsed FilePaths.

@mgsloan
Copy link
Contributor

mgsloan commented Oct 1, 2016

I wonder why we don't simply create a list of the files in the package directory before the call and find the one that matches Network/AWS/Internal/Body.{exts}?! At least we could pass on creating the Path Abs File and check existence with the collapsed FilePaths.

I suspect the reasoning was that things ought to be reasonably fast, and now we are discovering we'd like to optimize them. Feel free to try to eliminate the overhead even if it means switching to FilePaths in a few spots.

@jacknojo
Copy link

Also seeing this with a project using several github projects as extra-deps:

With no changes (so a ""null" build) I have:

time stack -v build

real 0m8.604s
user 0m3.826s
sys 0m1.946s

Finished in 0ms: getPackageFiles /mnt/share/src/legmedcordova/.stack-work/downloaded/TOoHcgJ62C7-/ghcjs-dom/ghcjs-dom.cabal
Finished in 0ms: getPackageFiles /mnt/shared/src/legmedcordova/.stack-work/downloaded/TOoHcgJ62C7-/ghcjs-dom-jsaddle/ghcjs-dom-jsaddle.cabal
Finished in 3814ms: getPackageFiles /mnt/shared/src/legmedcordova/.stack-work/downloaded/TOoHcgJ62C7-/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal
Finished in 2540ms: getPackageFiles /mnt/shared/src/legmedcordova/.stack-work/downloaded/HPwLfhSlUszW/jsaddle-dom.cabal
Finished in 2ms: getPackageFiles /mnt/shared/src/legmedcordova/legmedcordova.cabal
Finished in 239ms: getPackageFiles /mnt/shared/src/legmedcordova/.stack-work/downloaded/ktIvtY2wrllE/reflex.cabal
Finished in 22ms: getPackageFiles /mnt/shared/src/legmedcordova/.stack-work/downloaded/vkgicrxe9HwG/reflex-dom/reflex-dom.cabal
Finished in 330ms: getPackageFiles /mnt/shared/src/legmedcordova/.stack-work/downloaded/vkgicrxe9HwG/reflex-dom-core/reflex-dom-core.cabal

So just under 7 seconds (80%) is in getPackageFiles.

stack and strace log attached.

I am wondering if the build time could be lowered by promoting the github checkouts to "normal" packages or if it would not matter?
logs.zip

@mgsloan
Copy link
Contributor

mgsloan commented Sep 17, 2017

@jacknojo getPackageFiles doesn't care about whether it's a github checkout or normal package. I suspect the reason so much time is used is because ghcjs-dom-jsffi has so many modules. Of course, that doesn't mean that such overheads are acceptable. This definitely warrants further investigation.

A few misc thoughts:

  • This may be quite slow when many source directories are involved. For each module, it will check each of the source directories. In most cases it is likely faster to recursively enumerate contents of the include directories.

  • Another thing to consider here is that we'll also be getting the modification time for all the files. Note this isn't really compatible with the point above - I don't think there's a way to get modtime while listing directories.

@mpilgrem
Copy link
Member

I am going to close this issue, given the passage of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants