Page MenuHome

Fix T97375: Changing node tree from Python is very slow.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on May 4 2022, 2:07 PM.

Details

Summary

There is still the problem that performance degrades quadratically when the number of nodes/links increases. However, there was a lot of unnecessary overhead because the NodeTreeRef was build unnecessarily often. That was because the update method of the Map Range node always tagged the node tree for change, even though nothing changed.

Fixing this speeds up the provided test script from 5s to 0.25s.

Diff Detail

Repository
rB Blender
Branch
wrong-node-tree-update-tag (branched from master)
Build Status
Buildable 21959
Build 21959: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.May 4 2022, 2:07 PM
Jacques Lucke (JacquesLucke) created this revision.

Looks good, except for the inline comment.

source/blender/nodes/shader/nodes/node_shader_map_range.cc
181

Probably not intentional

This revision is now accepted and ready to land.May 4 2022, 2:21 PM
  • Merge branch 'master' into wrong-node-tree-update-tag
  • fix