[Bf-blender-cvs] [3a015bb] master: Depsgraph: Report total time spent on scene update

Sergey Sharybin noreply at git.blender.org
Fri Apr 17 15:58:09 CEST 2015


Commit: 3a015bb76b0325cdf542356c89f2b7d2b196895a
Author: Sergey Sharybin
Date:   Fri Apr 17 18:55:47 2015 +0500
Branches: master
https://developer.blender.org/rB3a015bb76b0325cdf542356c89f2b7d2b196895a

Depsgraph: Report total time spent on scene update

Previously was only per-thread timing.

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

M	source/blender/blenkernel/intern/scene.c

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 60b05ce..07e2a18 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1479,6 +1479,7 @@ static void scene_update_object_add_task(void *node, void *user_data)
 static void print_threads_statistics(ThreadedObjectUpdateState *state)
 {
 	int i, tot_thread;
+	double finish_time;
 
 	if ((G.debug & G_DEBUG_DEPSGRAPH) == 0) {
 		return;
@@ -1504,6 +1505,7 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state)
 		}
 	}
 #else
+	finish_time = PIL_check_seconds_timer();
 	tot_thread = BLI_system_thread_count();
 
 	for (i = 0; i < tot_thread; i++) {
@@ -1533,6 +1535,9 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state)
 
 		BLI_freelistN(&state->statistics[i]);
 	}
+	if (state->has_updated_objects) {
+		printf("Scene update in %f sec\n", finish_time - state->base_time);
+	}
 #endif
 }




More information about the Bf-blender-cvs mailing list