Commit 4d7f1a27 authored by Mathieu Giraud's avatar Mathieu Giraud

core/*.{h,cpp}: speed up build time

Use lib/json.hpp only when needed, and use lib/json_fwd.h elsewhere.
Yield a 40% speedup in build time on at least one platform.

See #3307.
parent eb0f52de
......@@ -22,6 +22,7 @@
*/
#include "cluster-junctions.h"
#include "../lib/json.hpp"
#include<cstdlib>
bool MySort(const pair<int, string>& lh, const pair<int, string>& rh){
......
......@@ -9,7 +9,7 @@
#include <ctime>
#include "dynprog.h"
#include "windows.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
using namespace std ;
using json = nlohmann::json;
......
#include "filter.h"
#include "germline.h"
#include "automaton.hpp"
#include "../lib/json.hpp"
#include <fstream>
#include <ctype.h>
......
......@@ -9,7 +9,7 @@
#include "automaton.hpp"
#include "stats.h"
#include "tools.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
#include "kmerstorefactory.hpp"
#include "bioreader.hpp"
#include "filter.h"
......
......@@ -24,6 +24,7 @@
#include <cassert>
#include "segment.h"
#include "tools.h"
#include "../lib/json.hpp"
#include "affectanalyser.h"
#include <sstream>
#include <cstring>
......
......@@ -11,7 +11,7 @@
#include "kmerstore.h"
#include "kmeraffect.h"
#include "affectanalyser.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
#include "filter.h"
// #define DEBUG_EVALUE
......
......@@ -22,6 +22,7 @@
*/
#include "similarityMatrix.h"
#include "../lib/json.hpp"
#include <cassert>
#include <limits>
#include <math.h>
......
......@@ -6,7 +6,7 @@
#include <iostream>
#include <iomanip>
#include "json.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
using namespace std;
using json = nlohmann::json;
......
......@@ -3,6 +3,7 @@
#include <iomanip>
#include <algorithm>
#include "tools.h"
#include "../lib/json.hpp"
string seed_contiguous(int k)
{
......
......@@ -37,7 +37,7 @@
#include <vector>
#include "bioreader.hpp"
#include "kmeraffect.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
using json = nlohmann::json;
using namespace std;
......
#include <iostream>
#include <string>
#include "tools.h"
#include "../lib/json.hpp"
#include "windows.h"
#include "representative.h"
#include "segment.h"
......
......@@ -19,7 +19,7 @@
#include "read_score.h"
#include "representative.h"
#include "stats.h"
#include "../lib/json.hpp"
#include "../lib/json_fwd.hpp"
#define NB_BINS 30
#define MAX_VALUE_BINS 500
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment