forked from lix-project/lix
jade
edba570664
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: lix-project/lix#159
Change-Id: I7edea95c8536203325c8bb4dae5f32d727a21b2d
24 lines
575 B
C++
24 lines
575 B
C++
#pragma once
|
|
///@file logging-json.hh
|
|
///
|
|
///@brief Logging functions for json specifically, split due to the cost of
|
|
///including nlohmann.
|
|
|
|
#include "logging.hh"
|
|
|
|
#include <nlohmann/json_fwd.hpp>
|
|
|
|
namespace nix {
|
|
|
|
std::optional<nlohmann::json> parseJSONMessage(const std::string & msg);
|
|
|
|
bool handleJSONLogMessage(nlohmann::json & json,
|
|
const Activity & act, std::map<ActivityId, Activity> & activities,
|
|
bool trusted);
|
|
|
|
bool handleJSONLogMessage(const std::string & msg,
|
|
const Activity & act, std::map<ActivityId, Activity> & activities,
|
|
bool trusted);
|
|
|
|
};
|