Commit: 1db1ac121a5606752028eee0a61ed1368ad4dd15
Author: Jacques Lucke
Date:   Sat Apr 27 22:32:11 2019 +0200
Branches: functions
https://developer.blender.org/rB1db1ac121a5606752028eee0a61ed1368ad4dd15

reduce likelyhood for heap allocation in fgraph evaluation

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

M       source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp

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

diff --git a/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp 
b/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
index a56d06f0b81..6b7ce6fe1dd 100644
--- a/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
+++ b/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
@@ -218,7 +218,8 @@ class ExecuteFGraph : public TupleCallBody {
                                          Tuple &fn_out,
                                          ExecutionContext &ctx) const
   {
-    SmallStack<DFGraphSocket> sockets_to_compute;
+    SmallStack<DFGraphSocket, 64> sockets_to_compute;
+
     for (auto socket : m_fgraph.outputs()) {
       sockets_to_compute.push(socket);
     }
@@ -248,6 +249,7 @@ class ExecuteFGraph : public TupleCallBody {
         else {
           bool all_inputs_computed = true;
           uint node_id = m_graph->node_id_of_output(socket.id());
+
           for (uint input_id : m_graph->input_ids_of_node(node_id)) {
             if (!storage.is_input_initialized(input_id)) {
               sockets_to_compute.push(DFGraphSocket::FromInput(input_id));

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to