[Closed] SDK: delete INodes more quickly?
I’m generating a lot of INode instances at render time (50,000+). Everything runs fine until it comes time to delete them. When I cycle through them all and call inode->DeleteMe() the loop takes a really long time to complete (minutes).
I’m assuming this is because the DeleteMe function is doing a lot of checks to make sure the INodes are nicely cleaned up in the scene. But my INodes have no parent, no children, no connections to other nodes…they don’t even have their own ObjectRef since they’re instances. So surely there must be a more efficient method I can use to delete them? I’ve also tried GetCOREInterface9()->DeleteNodes(…) but it’s no faster. And just deleting their pointer results in a crash of course.
Does anyone know what DeleteMe is doing behind the scenes? I’m hoping there’s a way I can run a stripped-down version of it on my nodes that will make things faster…any ideas?
play with DisableRefMsgs, SuspendAll, and SuspendUndo…
(DeleteNodes has to work. It shouldn’t cause any problems)
Didn’t bother testing, just threw all 3 in there are saw a speed boost
Probably doesn’t matter anyways, gonna switch to VRay instancing for this problem and not deal with extra INodes at all.
So for speed is this what we need to use…
AnimateSuspend(true, true, true);
SuspendAll(true, true, true, true, true, true, true);
or is there more to turn off?