1
0
Fork
You've already forked shortstraw
0
No description
  • Haskell 93.6%
  • Nix 6.4%
Teo Camarasu 8f49c295e9
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
add export lists
2022年05月02日 21:52:45 +01:00
app add export lists 2022年05月02日 21:52:45 +01:00
.gitignore Initial commit 2022年01月12日 17:15:33 +00:00
.woodpecker.yml rename job to build 2022年05月02日 21:31:42 +01:00
CHANGELOG.md Initial commit 2022年01月12日 17:15:33 +00:00
flake.lock update flake 2022年05月02日 21:31:42 +01:00
flake.nix update flake 2022年05月02日 21:31:42 +01:00
LICENSE Initial commit 2022年01月12日 17:15:33 +00:00
README.md fix typo 2022年03月13日 16:20:44 +00:00
shell.nix Initial commit 2022年01月12日 17:15:33 +00:00
shortstraw.cabal split out ModGraph module 2022年05月02日 21:47:35 +01:00

Shortstraw -- a tool for analyzing GHC parallel builds

Overview

There are broadly two ways in which GHC can build haskell projects in parallel.

  1. Package/unit level parallelism

    This is enabled by passing "-j" to cabal-install/stack.

  2. Module level parallelism

    This is enabled by passing "-j" to GHC, eg, via "--ghc-options".

This package deals with the second type of parallelism. This type of parallelism is crucial for compilling large Haskell packages in a reasonable amount of time.

Yet, the effectiveness of this parallelism is limited by the critical path of the package. A linear chain of heavy modules can easily starve this parallelism.

This package gives us tools to analyze this critical path.

Status

This project is quite unstable. At the moment it only caters to my specific needs. If you are interested in a different type of analysis, please open an issue and I'd be happy to discuss it.

How to use

The executable exposed by this package reads verbose logs from GHC on stdin and outputs the critical path on stdout.

To create these logs you need to pass -v2 to GHC. I also recommend running GHC with -j1 as this gives the most accurate statistics and avoids issues with lines being mangled by parallel logging.