diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-20 17:51:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-20 17:53:39 +0300 |
commit | 1e236deab3636984054fed4920c477b56934fe6a (patch) | |
tree | 7c22590338bc75927db9599e58263a55409efb4d /source | |
parent | 65128d296cd0db1eb5cb9db09d28950b727bdfaa (diff) |
Depsgraph: Remove unused priority calculator
While it sounds useful, in practice it was rather causing
extra overhead and was slowing things down.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc index 6a1032669bc..0f6fa2897ba 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval.cc @@ -55,9 +55,6 @@ extern "C" { #include "intern/depsgraph_intern.h" #include "util/deg_util_foreach.h" -/* Unfinished and unused, and takes quite some pre-processing time. */ -#undef USE_EVAL_PRIORITY - namespace DEG { /* ********************** */ @@ -161,33 +158,6 @@ static void calculate_pending_parents(Depsgraph *graph, unsigned int layers) do_threads); } -#ifdef USE_EVAL_PRIORITY -static void calculate_eval_priority(OperationDepsNode *node) -{ - if (node->done) { - return; - } - node->done = 1; - - if (node->flag & DEPSOP_FLAG_NEEDS_UPDATE) { - /* XXX standard cost of a node, could be estimated somewhat later on */ - const float cost = 1.0f; - /* NOOP nodes have no cost */ - node->eval_priority = node->is_noop() ? cost : 0.0f; - - foreach (DepsRelation *rel, node->outlinks) { - OperationDepsNode *to = (OperationDepsNode *)rel->to; - BLI_assert(to->type == DEG_NODE_TYPE_OPERATION); - calculate_eval_priority(to); - node->eval_priority += to->eval_priority; - } - } - else { - node->eval_priority = 0.0f; - } -} -#endif - /* Schedule a node if it needs evaluation. * dec_parents: Decrement pending parents count, true when child nodes are * scheduled after a task has been completed. @@ -314,13 +284,6 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx, node->done = 0; } - /* Calculate priority for operation nodes. */ -#ifdef USE_EVAL_PRIORITY - foreach (OperationDepsNode *node, graph->operations) { - calculate_eval_priority(node); - } -#endif - schedule_graph(task_pool, graph, layers); BLI_task_pool_work_and_wait(task_pool); |