[Bf-blender-cvs] [b6980ad] master: Depsgraph: Add code for timing despgraph builder

Sergey Sharybin noreply at git.blender.org
Thu Nov 3 13:25:11 CET 2016


Commit: b6980ade90766d355690a551103b50aa97cd22fd
Author: Sergey Sharybin
Date:   Thu Nov 3 13:24:41 2016 +0100
Branches: master
https://developer.blender.org/rBb6980ade90766d355690a551103b50aa97cd22fd

Depsgraph: Add code for timing despgraph builder

===================================================================

M	source/blender/depsgraph/intern/depsgraph_build.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 7a3b19e..7b3922a 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -32,6 +32,8 @@
 
 #include "MEM_guardedalloc.h"
 
+// #define DEBUG_TIME
+
 extern "C" {
 #include "DNA_cachefile_types.h"
 #include "DNA_object_types.h"
@@ -41,6 +43,11 @@ extern "C" {
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
+#ifdef DEBUG_TIME
+#  include "PIL_time.h"
+#  include "PIL_time_utildefines.h"
+#endif
+
 #include "BKE_main.h"
 #include "BKE_collision.h"
 #include "BKE_effect.h"
@@ -190,6 +197,10 @@ void DEG_add_special_eval_flag(Depsgraph *graph, ID *id, short flag)
  */
 void DEG_graph_build_from_scene(Depsgraph *graph, Main *bmain, Scene *scene)
 {
+#ifdef DEBUG_TIME
+	TIMEIT_START(DEG_graph_build_from_scene);
+#endif
+
 	DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
 
 	/* 1) Generate all the nodes in the graph first */
@@ -239,6 +250,10 @@ void DEG_graph_build_from_scene(Depsgraph *graph, Main *bmain, Scene *scene)
 		abort();
 	}
 #endif
+
+#ifdef DEBUG_TIME
+	TIMEIT_END(DEG_graph_build_from_scene);
+#endif
 }
 
 /* Tag graph relations for update. */




More information about the Bf-blender-cvs mailing list