diff --git a/src/reader.cpp b/src/reader.cpp index 342a56e..11bc7a9 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -148,6 +148,7 @@ extern "C"{ unsigned int blocks_counter = 0; while (!inFile.eof()){ + PROFILER_BEGIN_BLOCK("Read block from file") uint16_t sz = 0; inFile.read((char*)&sz, sizeof(sz)); if (sz == 0) @@ -176,6 +177,7 @@ extern "C"{ { //auto lower = std::lower_bound(root.children.begin(), root.children.end(), tree); /**/ + PROFILER_BEGIN_BLOCK("Find children") auto rlower1 = ++root.children.rbegin(); for(; rlower1 != root.children.rend(); ++rlower1){ if(mt0 > rlower1->node->block()->getBegin()) @@ -190,6 +192,7 @@ extern "C"{ if (gather_statistics) { + PROFILER_BEGIN_BLOCK("Gather statistic for frame") frame_statistics.clear(); //frame_statistics.reserve(tree.children.size()); // this gives slow-down on Windows @@ -216,12 +219,13 @@ extern "C"{ if (gather_statistics) { + PROFILER_BEGIN_BLOCK("Gather statistic") BlocksTree& current = root.children.back(); update_statistics(overall_statistics, current.node, current.total_statistics); } } - + PROFILER_BEGIN_BLOCK("Gather statistic for roots") if (gather_statistics) { for (auto& root : threaded_trees) @@ -246,7 +250,7 @@ extern "C"{ root.second.total_children_number += static_cast(root.second.children.size()); } } - + PROFILER_END_BLOCK // No need to delete BlockStatistics instances - they will be deleted on BlocksTree destructors return blocks_counter;