cabal-install should try to minimise the critical path when compiling a build graph concurrently
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Currently, `cabal-install` will execute the build plan in a naive FIFO order. However, when using e.g. `-jsem`, it would be more beneficial to prioritise packages on the critical path.
I did a quick experiment building pandoc with `-j8`. The critical path was 291s, but with the default build order the build took 334s.
If we estimate the build time of each component using the module count, it seems we get most of the benefits without knowing ahead of time what the critical path is. In my experiment, the build plan using this estimate landed at 296s.
Contributor guide
Research direction
Start by tracing cabal-install's concurrent build-plan scheduler and how it currently applies FIFO ordering for -jsem. Compare a module-count-based priority with the reported critical path, and consider the work done when concurrent builds consistently prioritize critical-path packages without reducing parallelism.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100