tweag / tweag/rules_haskell

Profiling is unecessary slow

Open
#438 12 comments 0 reactions 1 assignee View on GitHub

@guibou is already working on this.

Since Sep 10, 2018.

P3 type: bug
Dominant language
Starlark
Stars
279
Forks
93
Avg merge
13d 11h
Merged PRs (30d)
3

Description

This is an updated description which summarize the discussion

  • Building with -c dbg is really slow when template haskell is used because we use -fexternal-interpreter and this GHC bug: https://ghc.haskell.org/trac/ghc/ticket/16256#ticket . In summary, profiling build is 15x times slower than normal build.
  • There is two solutions to build haskell with profiling if template haskell is involved. -fexternal-interpreter, which is now used in rules_haskell, and another solution which build two times, once without profiling (so template haskell can execute non profiled code) and one with profiling.
  • rules_haskell was initially using the two build solution, but the switch to -fexternal-interpreter was accidentally done in be5cf67#diff-33a8c46955e2a9917090b5258346aee2R205. Since #892 the dead code of the two build solution was removed.

We have two solution here:

  • Keep the approach with -fexternal-interpreter and wait for an upstream fix for GHC
  • Get back to the approach without -fexternal-interpreter and reimplement the two steps build.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.