Reputation: 2036
In latest Adobe Flex sdk 4.6, what is better from performance view?
<s:Group width="100%" height="100%"/>
or
<s:Group left="0" right="0" top="0" bottom="0"/>
Thank you.
Upvotes: 2
Views: 467
Reputation: 15524
In BasicLayout.updateDisplayList()
i found this (in loop for every child element):
if (!isNaN(percentWidth))
{
var availableWidth:Number = unscaledWidth;
if (!isNaN(left))
availableWidth -= left;
if (!isNaN(right))
availableWidth -= right;
childWidth = Math.round(availableWidth * Math.min(percentWidth * 0.01, 1));
elementMaxWidth = Math.min(layoutElement.getMaxBoundsWidth(),
maxSizeToFitIn(unscaledWidth, hCenter, left, right, layoutElement.getLayoutBoundsX()));
}
else if (!isNaN(left) && !isNaN(right))
{
childWidth = unscaledWidth - right - left;
}
And same for height.
So, looks like:
Also, most of Flex4 skins are based top and left - i think for performance reason too.
Upvotes: 5