Skip to content

Conversation

@xokdvium
Copy link
Contributor

Motivation

A lot of compile time can be shaved off by just using using precompiled headers for expensive files.
Bottlenecks were discovered with the help of #13510.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the new-cli Relating to the "nix" command label Jul 20, 2025
@xokdvium xokdvium added the contributor-experience Developer experience for Nix contributors label Jul 20, 2025
@xokdvium xokdvium force-pushed the speed-up-builds-pch branch from 7a6bcec to 9dae9f6 Compare July 20, 2025 19:02
@xokdvium
Copy link
Contributor Author

On my machine this shaves off quite a few CPU minutes for native-clangStdenv (though the wall time isn't affected much, but it would be for less powerful machines):

(Before)

Command being timed: "ninja"
        User time (seconds): 2122.56
        System time (seconds): 111.07
        Percent of CPU this job got: 1278%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:54.70

(After)

Command being timed: "ninja"
        User time (seconds): 1695.70
        System time (seconds): 89.14
        Percent of CPU this job got: 1058%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:48.66

Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

Amazing

@roberth roberth merged commit 6ec50ba into NixOS:master Jul 21, 2025
12 checks passed
@Ericson2314
Copy link
Member

Thank you!

@xokdvium xokdvium deleted the speed-up-builds-pch branch July 21, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor-experience Developer experience for Nix contributors new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants