performance - What is better for perfomance width="100%" or left="0" right="0"? -


in latest adobe flex sdk 4.6, better performance view?

<s:group width="100%" height="100%"/> 

or

<s:group left="0" right="0" top="0" bottom="0"/> 

thank you.

in basiclayout.updatedisplaylist() found (in loop 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 height.

so, looks like:

  1. percenwidth has higher priority top , left (if both set)
  2. top , left calculated easier percenwidth (single subtraction against round, functions call , conditions)
  3. top , left may used styles declarations.

also, of flex4 skins based top , left - think performance reason too.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -