Improving the performance of PyMEL
I hope at this point, PyMEL's superiority over
maya.cmds has been thoroughly demonstrated. If you have any doubt, feel free to rewrite the examples in this chapter to use
maya.cmds and see how much cleaner the PyMEL versions are.
Having said that, PyMEL can be slower than
maya.cmds. The performance difference can usually be made up by applying one of the following three improvements.
For most scripts, the performance difference is too miniscule to matter. Fast and slow are relative terms. The important metric is fast enough. If your code is fast enough, performance improvements won't really matter. Most of the tools you will write fall under this category. For example, making a pose mirroring ...