unit – Flatten the hierarchy at the time of construction

Nested hierarchies cause performance overload when they include moving objects.

Whenever a GameObject moves to alter its transformation, we must inform all concerned gaming systems. The render, the physics and all the parents and children of GameObject must be informed of this movement in order to match. As the scope of a game increases and the number of game objects soar, sending all these messages can become a performance issue.

However, nested hierarchies are useful for organizing a scene and for separating logical groups from game objects.

What options exist to save performance while maintaining hierarchy? Is there a pre-existing solution to flatten a hierarchy during construction only?