Closed FinleyMcIlwaine closed 1 year ago
@Kleidukos let me know if there is anything I can do to make this easier to review. I do not think we need to be concerned about the perf regressions mentioned in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10249#note_491390. I have not been able to reproduce them. These are the perf results I am seeing:
Baseline
Test Metric value New value Change
--------------------------------------------------------------------------
haddock.Cabal(normal) run/alloc 23,567,939,952 24,685,266,616 +4.7%
haddock.base(normal) run/alloc 44,852,672,216 46,898,560,216 +4.6%
haddock.compiler(normal) run/alloc 191,419,016,712 192,057,742,680 +0.3%
Where the baseline is the ghc-9.6
branch (in the GHC repo, not Haddock), and the tested branch includes this work in the haddock submodule.
The recompilation avoidance discussed in the docs is dependent on this GHC MR, so I will mark this as a draft until those changes are merged and backported. I will ping you when/if that occurs 🙂
@FinleyMcIlwaine Thanks for doing this work. :)
@Kleidukos The recompilation avoidance section in invoking.rst
is now accurate, and this PR is ready for merge. Thanks!
I'm working on getting hi-haddock over the finish line. The steps I intend to execute are:
This MR is fully complete and ready to merge and I have verified that tests pass (with a patched version of GHC that includes fixes for associated data family documentation). I have observed no performance regressions, only a slight improvement in memory usage for baseline haddock generation (just default
cabal haddock
). Testing on the Agda codebase, the-s
statistics are:Compared to the baseline performance measured on the current
ghc-9.6
branch haddock:~Just a small improvement (\~8MB) in maximum residency~. Happy to make changes as requested and provide more metrics if necessary.
EDIT: The metrics noted above were affected by some environment and tooling configurations that were not accounted for at the time that this PR was initially submitted. Fortunately, Hi Haddock has a much larger (positive) impact on Haddock's memory usage. See my blog post here.