This was achieved by running maintainers/buildtime_report.sh on the build directory of a meson build, then asking "why the heck is json eating our build times", and strategically moving the json using bits out of widely included headers. It turns out that putting literally any metrics whatsoever into the build had immediate and predictable results. Results are 1382.5s frontend time -> 1175.4s frontend time, back end time approximately invariant. Related: https://git.lix.systems/lix-project/lix/issues/159 Change-Id: I7edea95c8536203325c8bb4dae5f32d727a21b2d
30 lines
626 B
C++
30 lines
626 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include "experimental-features.hh"
|
|
#include "json-utils.hh"
|
|
|
|
namespace nix {
|
|
|
|
/**
|
|
* Compute the documentation of all experimental features.
|
|
*
|
|
* See `doc/manual` for how this information is used.
|
|
*/
|
|
nlohmann::json documentExperimentalFeatures();
|
|
|
|
/**
|
|
* Semi-magic conversion to and from json.
|
|
* See the nlohmann/json readme for more details.
|
|
*/
|
|
void to_json(nlohmann::json &, const ExperimentalFeature &);
|
|
void from_json(const nlohmann::json &, ExperimentalFeature &);
|
|
|
|
/**
|
|
* It is always rendered as a string
|
|
*/
|
|
template<>
|
|
struct json_avoids_null<ExperimentalFeature> : std::true_type {};
|
|
|
|
};
|