Performance - transform or not?

I noticed in the programming guide that for best performance, the graph should be kept as shallow as possible with only one GeometryGroup. I have many repeated structures in my scene, and I’d like the define the primitive once then use transform nodes to translate/rotate it instead of making individual primitives for each repeat. Since a transform node only can have GeometryGroup or Group as its children, I have as many GeometryGroups as transforms, each with its own (but identical) primitive. Will I take a big performance hit by doing this?

It’s all a balancing act, so we can’t comment on exactly which would be better in your particular application. If you can avoid the Transform nodes, then that generally performs better. However if replication of the data increases your memory load or creates other issues in your application (namely with the additional copies or the cost to flatten the data) then the cost of using a Transform node could be worth it. In practice we’ve found Transform nodes to be useful for instancing.

The object of the advice in the programming guide wasn’t to suggest never using Transforms, but it was to inform developers of the potential dangers of create extremely deep graphs and to consider where things such as Transform nodes are actually needed.