Legacy MPxNode plug-ins defaulting to parallel evaluation: what are the actual limits and risks?
0 reputation · 19 Nov 2021, 15:10 UTC
0 reputation · 19 Nov 2021, 15:10 UTC
I'm auditing a set of older C++ plug-in nodes (compiled against pre-2016 Maya APIs) that are now loaded in a modern Maya version where the Evaluation Manager runs in parallel mode by default. These nodes predate MPxNode::evaluationMethod(), so they cannot declare kSerial or kDefer — as I understand it, they silently fall back to kParallel.
Some of these nodes access shared state inside compute(): static caches, non-reentrant third-party libraries, and in one case file I/O. The documented contract says compute methods "should be thread-safe," but there appears to be no load-time enforcement, no runtime sandbox, and no automatic serialization for nodes that violate it.
My uncertainty is about the practical boundary of what Maya guarantees here. The Evaluation Manager UI reports parallel vs. serial node counts, and the Evaluation Graph Profiler shows region boundaries, but neither seems able to identify which specific custom nodes are unsafe — only the global serial-mode workaround, which costs significant rig performance.
Specifically:
evaluationMethod() consistent across Maya 2019 through current releases, or did the conservative heuristics change the fallback?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.