Files
test2/source/blender/blenkernel
Jacques Lucke 99984b3b05 Nodes: optimize freeing all nodes
We generally expect `bNodeTreeRuntime::nodes_by_id` to be valid at all times, so
it also has to have the same order `bNodeTree.nodes`. When freeing a node, the
entire vector set was rebuild currently to ensure that invariant. This leads
O(n^2) behavior when all nodes are freed as is commonly the case with depsgraph
copies etc.

This patch implements an optimization where `nodes_by_id` is not rebuild if only
the last node was removed. In this case, that not can just be popped from
`nodes_by_id` without affecting the order of the other nodes. To use this
optimization, the node tree freeing code now frees nodes in reverse order.

Pull Request: https://projects.blender.org/blender/blender/pulls/143831
2025-08-02 12:35:16 +02:00
..
2025-08-02 12:35:16 +02:00
2025-04-04 18:38:53 +02:00
2025-05-22 16:32:44 +02:00