Hi,
We have a list of cards in our game.
These cards are displayed in an UIGrid with SmoothTween enabled.
We are trying to do a nice animation with these cards. Every time we add one to the grid(+0.4s), we reposition the grid:

The problem is that we have a scrollbar, and it triggers the CalculateRelativeWidgetBounds function. Since it's a recursive function on all the widgets underneath the panel, it is called 11 000 times !!!! (We have about 50 cards, with one background, an icon, the foreground, and 1 or 2 UILabel)
In our example, we tried to do it progressively, but it started with 0kb of garbage generated and ended with 6Mb of garbage during the last card animation. 6Mb !!!!!!!
We tried to do it instantly on all the cards by giving up the progressive effect (and loose a nice card distribution effect) but the frame still generates 6Mb of garbage.
Do you have an idea on how we can optimize this or change something in our setup to optimize it?
Thank you for your help.
EDIT: I would like to add that this is the GetComponent<UIPanel> on each widget that is generating so much garbage. Would it be possible to cache it and reuse it every time ?