I am working on ways to speed up my UI. The thing i have way to many whingeing components. The slow down happens because i am using 150 geom nodes to display the UI and thats not including the scene!
I was thinking of some how collapsing many of the unchaining nodes together but the trick is that i already have a good nodePath hierarchy, i need to mark some staff that should not be flattened that changes every frame or changes at once with all the other stuff.
Is there a better way then just pick my geoms reparent them to a temp node flatten and then reparent it back and hide all the geoms i marked?
The ModelNode was created for this purpose. ModelNodes will not be touched by the flatten operation, depending on the preserveTransform() flag you apply to them.
The nodes below a ModelNode may still be flattened with each other, though.
I should also add that flattenMedium() may also be your best choice here: it’s different from flattenStrong() in that it will not destroy the hierarchy. flattenMedium() will not combine sibling nodes together.