Skip to content

haskellPackages.mkDerivation: faster haddockPhase#462361

Merged
wolfgangwalther merged 2 commits intoNixOS:haskell-updatesfrom
mpscholten:haddock-is-slow
Dec 26, 2025
Merged

haskellPackages.mkDerivation: faster haddockPhase#462361
wolfgangwalther merged 2 commits intoNixOS:haskell-updatesfrom
mpscholten:haddock-is-slow

Conversation

@mpscholten
Copy link
Contributor

From my understanding the -j flag has not been passed to haddock. I used --haddock-option=--trace-args to return all the arguments passed by nixpkgs and -j is not in that output.

Also running a time nix build #myPkg.doc is now 10 seconds faster for one of my packages.

More controversial the second commit adds --no-tmp-comp-dir to remove a bit of IO. We don't need that as the nix build directory is already our temp directory.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Nov 16, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Nov 24, 2025
@mpscholten
Copy link
Contributor Author

@sternenseemann @maralorn @wolfgangwalther any thoughts on this one?

Copy link
Contributor

@wolfgangwalther wolfgangwalther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM, will defer to @sternenseemann to decide whether to try it this cycle.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Dec 8, 2025
@wolfgangwalther
Copy link
Contributor

Also running a time nix build #myPkg.doc is now 10 seconds faster for one of my packages.

Which package in Nixpkgs can we try this on?

@mpscholten
Copy link
Contributor Author

The 10 seconds was for nix build .#haskellPackages.ihp.doc

@mpscholten
Copy link
Contributor Author

Before this patch on 41d975f14f0aaeb0e591efb1c817272c20ac4d40:

marc@Mac:~/digitallyinduced/nixpkgs/ > time nix build .#haskellPackages.ihp
nix build .#haskellPackages.ihp  0.55s user 1.08s system 1% cpu 2:39.59 total

After this patch on 5b7296475fe2027be0a76dc743b50fc2a299f4f3:

marc@Mac:~/digitallyinduced/nixpkgs/ > time nix build .#haskellPackages.ihp
nix build .#haskellPackages.ihp  0.56s user 1.16s system 1% cpu 2:17.64 total

@wolfgangwalther
Copy link
Contributor

I see the same speedup. Not merging immediately, because we currently don't have a full rebuild going - but once we do, we should.

@wolfgangwalther wolfgangwalther added this pull request to the merge queue Dec 26, 2025
Merged via the queue into NixOS:haskell-updates with commit 861a65f Dec 26, 2025
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants