Commit: 1e236deab3636984054fed4920c477b56934fe6a
Author: Sergey Sharybin
Date: Wed Dec 20 15:51:59 2017 +0100
Branches: master
https://developer.blender.org/rB1e236deab3636984054fed4920c477b56934fe6a
Depsgraph: Remove unused priority calculator
While it sounds useful, in practice it was rather causing
extra overhead and was slowing things down.
===================================================================
M source/blender/depsgraph/intern/eval/deg_eval.cc
===================================================================
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);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs