This is not an answer to the question, but I thought I'd post a
relevant discovery we made here, with the hope that it might help
someone else out if they run into a similar issue. We found
cmds.parent to be horribly inefficient when doing a large batch of
re-parenting. We have a system that uses callbacks to monitor our
shape library, and in this system we clean up a scene every time it is
loaded. This means we're doing a fair amount of re-parenting, though
for the slowdown that we encountered, the slowdown seemed
disproportionately large: we did tests that topped out at around 400
shapes being parented. this resulted in execution times approaching
some number of minutes. We switched over to api calls and there was a
precipitous drop in execution times: 5-10 seconds tops. It does make
some sense, and I don't think this means you have to use the api to do
all parenting, but in certain situations it may help.
Also of note: we have run into some performance issues using cmds.file
to open files. The mel call works fine, and so does the api, so we use
the api call to open files now.
We are currently running Maya2009 32 bit PC.
-Judah
--
http://groups.google.com/group/python_inside_maya