[Bf-blender-cvs] [9a5663ff434] master: Cycles: Add time report for Blender data synchronization

Sergey Sharybin noreply at git.blender.org
Fri Sep 18 12:05:03 CEST 2020


Commit: 9a5663ff43494b31670eacf7eba41d3cc55fdc1a
Author: Sergey Sharybin
Date:   Fri Sep 18 12:03:22 2020 +0200
Branches: master
https://developer.blender.org/rB9a5663ff43494b31670eacf7eba41d3cc55fdc1a

Cycles: Add time report for Blender data synchronization

Allows to more easily access time information about how long Cycles
did spend synchronizing objects from evaluated depsgraph on Blender
side to its own structures.

This timer does not include time spent evaluating render depsgraph.

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

M	intern/cycles/blender/blender_sync.cpp

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

diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index b68e1931670..bb2240142b0 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -37,6 +37,7 @@
 #include "util/util_debug.h"
 #include "util/util_foreach.h"
 #include "util/util_hash.h"
+#include "util/util_logging.h"
 #include "util/util_opengl.h"
 #include "util/util_openimagedenoise.h"
 
@@ -219,6 +220,8 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
                             int height,
                             void **python_thread_state)
 {
+  scoped_timer timer;
+
   BL::ViewLayer b_view_layer = b_depsgraph.view_layer_eval();
 
   sync_view_layer(b_v3d, b_view_layer);
@@ -242,6 +245,8 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
   shader_map.post_sync(scene, false);
 
   free_data_after_sync(b_depsgraph);
+
+  VLOG(1) << "Total time spent synchronizing data: " << timer.get_time();
 }
 
 /* Integrator */



More information about the Bf-blender-cvs mailing list