cmds.delete extreemly slow

cmds.delete extreemly slow

tim-bot
Advocate Advocate
648 Views
1 Reply
Message 1 of 2

cmds.delete extreemly slow

tim-bot
Advocate
Advocate

Hey, i'm looking for some help with a performance issue. I've got a large hair set from xgen that i'm exporting the guides to alembic. during the process i convert them using

mel.eval("xgmCreateCurvesFromGuides 0 0")

then export using

cmds.AbcExport(jobArg = job_args)

and then i remove the temporary curves using

cmds.delete(temp_for_del)

temp_for_del is the group node all the splines are parented to. But this takes almost 15 minutes to delete. if i just leave them in the scene and select the groups from the UI and hit Delete on my keyboard, it take about 2 seconds.

I have history turned off for this operation, but that doesn't change anything. I've attempted to iterate the splines one by one and delete each individually, but that doesn't help. I've also tried to use the OpenMaya.MDagModifier.deleteNode function, but that takes just as long. Additionally, i've attempted to just select them and call the function that the UI appears to use, doDelete, but that takes just as long.

If anybody knows a better way to delete these curves that would be as fast as the UI, it would be greatly appreciated!

Thanks!

0 Likes
649 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

this is a maya "FEATURE". This is autodesk's way of telling you 'DON'T USE MAYA THIS WAY'

maya programmers traded speed for 'programability',  maya uses 'cmds' to execute much of what it does and that comes with a huge speed drop. to see that in practice create a sphere with a 100 thousand faces, select the faces and move them, go enjoy a cup of whatever until maya finishes moving the faces!!! while 3ds max moves a 500 thousand faces in a split second and unreal engine moves a million faces before even asking it to do so (just kidding you have to move them). Maya has the same power, yes it can handle millions of faces at more than 400fps but to get that you have to put 'cmds' aside. anyway, this Maya "FEATURE" is the price for how maya was designed to allow novice programmers to control maya without having to delve into C++