-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
<nlohmann/json_fwd.hpp>
. (#1472)
We identified recompiling JSON templates to contribute noticably to the compile time: **** Templates that took longest to instantiate: 16889 ms: nlohmann::basic_json<>::parse<const char *> (42 times, avg 402 ms) 12363 ms: nlohmann::basic_json<>::basic_json (127 times, avg 97 ms) 10129 ms: nlohmann::detail::parser<nlohmann::basic_json<>, nlohmann::detail::i... (42 times, avg 241 ms) 7934 ms: nlohmann::detail::parser<nlohmann::basic_json<>, nlohmann::detail::i... (42 times, avg 188 ms) 6145 ms: nlohmann::basic_json<>::json_value::json_value (211 times, avg 29 ms) Fortunately, we can avoid the issue by using a forward declaration.
- Loading branch information
Showing
5 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
#include "visitors/perf_visitor.hpp" | ||
|
||
#include <cassert> | ||
#include <utility> | ||
|
||
#include "ast/all.hpp" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters