[Bf-blender-cvs] [9d13321831d] master: Depsgraph: Perform early exit check prior to time tag

Sergey Sharybin noreply at git.blender.org
Tue Oct 8 11:02:30 CEST 2019


Commit: 9d13321831d321e51683fae5df53b7d68a9dc2d7
Author: Sergey Sharybin
Date:   Sun Oct 6 12:19:12 2019 +0200
Branches: master
https://developer.blender.org/rB9d13321831d321e51683fae5df53b7d68a9dc2d7

Depsgraph: Perform early exit check prior to time tag

Evaluation is not entirely cheap even in the case when there is nothing tagged
in the scene. This is because of all the calculation of pending operations,
cleating runtime flags and so on.

This commit makes it so time operation is tagged for update prior to early exit
check. Improves playback speed in a scene without anything animated.

Maniphest Tasks: T70463

Differential Revision: https://developer.blender.org/D6002

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

M	source/blender/depsgraph/intern/eval/deg_eval_flush.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 2479373b687..fd5ecec0b5b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -351,9 +351,6 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
   BLI_assert(bmain != NULL);
   BLI_assert(graph != NULL);
   /* Nothing to update, early out. */
-  if (BLI_gset_len(graph->entry_tags) == 0 && !graph->need_update_time) {
-    return;
-  }
   if (graph->need_update_time) {
     const Scene *scene_orig = graph->scene;
     const float ctime = BKE_scene_frame_get(scene_orig);
@@ -361,6 +358,9 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
     graph->ctime = ctime;
     time_source->tag_update(graph, DEG::DEG_UPDATE_SOURCE_TIME);
   }
+  if (BLI_gset_len(graph->entry_tags) == 0) {
+    return;
+  }
   /* Reset all flags, get ready for the flush. */
   flush_prepare(graph);
   /* Starting from the tagged "entry" nodes, flush outwards. */



More information about the Bf-blender-cvs mailing list