bmcweb is currently built as one giant compile unit. This is due to a couple of reasons:
crow was a header only library when this project started, and therefore required a recompile for every place it was included, which was every file. This lead to a lot of duplicated functions, and bloated compile times overall.
boost beast is template heavy, very slow to compile and was a majority of the actual compile time for bmcweb. The code bmcweb contains was only a small portion of the total build, and at the time there was no way to separate boost::beast. Separating the compile units netted no significant build time reductions.
In the meantime, a couple things have happened. Crow code has been essentially dropped at this point, which makes it moot. bmcweb seems to be getting a lot more handler code. This is increasing the build times for the non-core components. Also, boost beast in 1.70 will gain the BOOST_BEAST_SEPARATE_COMPILATION flag, which allows all of beast to be built in a separate compile unit.
Because of those facts, we should move bmcweb to a more conventional, multi-compile-unit build. The main goal of this is to decrease the incremental build time, with the hope that every incremental build will only require a recompile of the changed units, and a relink (which is slow anyway).
bmcweb is currently built as one giant compile unit. This is due to a couple of reasons:
In the meantime, a couple things have happened. Crow code has been essentially dropped at this point, which makes it moot. bmcweb seems to be getting a lot more handler code. This is increasing the build times for the non-core components. Also, boost beast in 1.70 will gain the BOOST_BEAST_SEPARATE_COMPILATION flag, which allows all of beast to be built in a separate compile unit.
Because of those facts, we should move bmcweb to a more conventional, multi-compile-unit build. The main goal of this is to decrease the incremental build time, with the hope that every incremental build will only require a recompile of the changed units, and a relink (which is slow anyway).