Currently, the tree starts from the root and works its way down the nodes every frame. This potentially causes a lot of overhead, especially in larger trees.
Current planned approach:
- As
process() is called on nodes, they can add themselves to the Executor's activeNodes list.
- If there are any
activeNodes when the Executor's process() is called, it calls process() on only those nodes in depth order
- If any node reports a change (We'll have to figure out what this means), we clear out any
activeNodes with depth > the depth of the changed node
- If for any reason there are no
activeNodes, then the Executor starts from the root
Currently, the tree starts from the root and works its way down the nodes every frame. This potentially causes a lot of overhead, especially in larger trees.
Current planned approach:
process()is called on nodes, they can add themselves to the Executor'sactiveNodeslist.activeNodeswhen the Executor'sprocess()is called, it callsprocess()on only those nodes indepthorderactiveNodeswithdepth> thedepthof the changed nodeactiveNodes, then the Executor starts from the root