diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-20 18:19:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-20 18:19:40 +0300 |
commit | b2ef042793d8723a8e1b433cf64cdc3fe823ff61 (patch) | |
tree | 47fd552827b61650c8a42246bdabc99fdfefcaf1 /source/blender/depsgraph/intern/builder | |
parent | f2aacfc943db17995bb16fb605d8ad4f6a215682 (diff) |
Depsgraph: Print some statistics about transitive reduction
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_transitive.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc index 30af0242aeb..7731b76c6b9 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc @@ -37,6 +37,7 @@ #include "intern/nodes/deg_node_operation.h" #include "intern/depsgraph.h" +#include "intern/depsgraph_intern.h" #include "util/deg_util_foreach.h" @@ -79,6 +80,7 @@ static void deg_graph_tag_paths_recursive(DepsNode *node) void deg_graph_transitive_reduction(Depsgraph *graph) { + int num_removed_relations = 0; foreach (OperationDepsNode *target, graph->operations) { /* Clear tags. */ foreach (OperationDepsNode *node, graph->operations) { @@ -108,12 +110,14 @@ void deg_graph_transitive_reduction(Depsgraph *graph) else if (rel->from->done & OP_REACHABLE) { rel->unlink(); OBJECT_GUARDED_DELETE(rel, DepsRelation); + ++num_removed_relations; } else { ++it_rel; } } } + DEG_DEBUG_PRINTF("Removed %d relations\n", num_removed_relations); } } // namespace DEG |