Hi,
UIPanel.LateUpdate is very slow. Actually it takes the 98% of the frame time. Using Scout I found that the majority of the time is spent in FillGeometry, UpdateTransform and UpdateWidgets
UIPanel.UIPanel_LateUpdate (global) 17 0% 55,673 89%
UIPanel.UIPanel_Fill_Material (global) 193 0% 24,629 39%
UIPanel.UIPanel_UpdateTransforms (global) 311 0% 15,492 24%
UIPanel.UIPanel_UpdateWidgets (global) 143 0% 15,016 24%
Going a bit deeper inside FillMaterials
UIWidget.UIWidget_WriteToBuffers_BetterList$1... (global) 68 0% 13,163 21% -> copy constructor of vector3 etc are evil..
UIDrawCall.UIDrawCall_Set_BetterList$1...(global) 81 0% 7,062 11% -> BetterListToArray conversion is critical here
And inside here the most costly functions are usually the Vector3 copy constructor and iteration over KeyValue pairs. Regardless of the timing it is quite surprising.
Is it true that I didn't mark the Panel as static and there are buttons that change UV and potentially other things that may move.. But it shouldn't regenerate the geometry every frame.. or updating so much things.
It was all static and nothing was moving.. There is a draggable panel here but it was not scrolling. There are some Anchor that update but they shouldn't affect the positions (apart at the first frame)
Wondering if there is some bug or something that continue to mark the panel as changed.. (I'm going to check). In any case does someone else have any problem with performance with Flash build ?