Skip to content

Speed up Nix compilation #4045

@edolstra

Description

@edolstra

Nix compilation is getting quite slow. Maybe we can speed it up with some header discipline. Some offenders:

  • #include <regex> adds about 0.4s per compilation unit.
  • #include <nlohmann/json.hpp> adds about 0.7s per compilation unit.
  • The 2 boost headers included in fmt.hh (<boost/format.hpp> and <boost/algorithm/string/replace.hpp>) add about 0.7s to every compilation unit. Not easy to get rid of, but maybe we can switch to C++20's std::format or https://github.com/fmtlib/fmt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions