Performance with many Nodes

Another question.

I’ve defined the diagram panel at the top left.

I’m using my own algorithm to place group and sub group.

Now if I set an offset on sub group location in layout algorithm (for example to add text above the diagram), part of sub-node is outside the diagram panel.

What should be the good way to process to managed my problem ?