Skip to main content
Inspiring
September 18, 2012
Question

AIR for iOS View performance

  • September 18, 2012
  • 1 reply
  • 876 views

In using FB4.6 with AIR 3.4 for iOS on Mac OS X 10.7.4 and when I run this on an iPad 2, one of my views is taking 3.2 secs before it's displayed. I've search for references to things to do to improve the performance

I have a View containing a TabbedViewNavigator with 2 tabs:-

<s:TabbedViewNavigator width="100%" height="100%">

     <s:ViewNavigator label="tabOne" firstView="TabOneView" width="100%" height="100%"/>

     <s:ViewNavigator label="tabTwo" firstView="TabTwoView" width="100%" height="100%"/>

</s:TabbedViewNavigator>

The the first view is:-

<?xml version="1.0" encoding="utf-8"?>

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

        xmlns:s="library://ns.adobe.com/flex/spark"

        actionBarVisible="false"

        title="TabOneView"

        render="trace(DateUtils.currentTime()+'TabOneView.render')"

        preinitialize="trace(DateUtils.currentTime()+'TabOneView.preinitialize')"

        contentCreationComplete="trace(DateUtils.currentTime()+'TabOneView.contentCreationComplete')"

        creationComplete="trace(DateUtils.currentTime()+'TabOneView.creationComplete')"

        width="100%" height="100%">

        <fx:Script>

            <![CDATA[

                import DateUtils;

            ]]>

        </fx:Script>

        <s:layout>

            <s:ConstraintLayout>

                <s:constraintColumns>

                    <s:ConstraintColumn id="leftPadding" width="10"/>

                    <s:ConstraintColumn id="leftColumn" width="100%"/>

                    <s:ConstraintColumn id="gutterColumn" width="20"/>

                    <s:ConstraintColumn id="rightColumn" width="100%"/>

                    <s:ConstraintColumn id="rightPadding" width="10"/>

                </s:constraintColumns>

                <s:constraintRows>

                    <s:ConstraintRow id="topPadding" height="10"/>

                    <s:ConstraintRow id="mainRow" height="67.5%"/>

                    <s:ConstraintRow id="operationRow" height="18.75%"/>

                    <s:ConstraintRow id="gutterRow" height="10"/>

                    <s:ConstraintRow id="commentsRow" height="18.75%"/>

                    <s:ConstraintRow id="bottomPadding" height="10"/>

                </s:constraintRows>

            </s:ConstraintLayout>

        </s:layout>

        <s:Label id="field1" height="44" fontSize="40" fontWeight="bold" textAlign="right"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:0"/>

        <s:Label id="field2" fontSize="20" fontWeight="bold"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:50"/>

        <s:Label id="field3" fontSize="20" fontWeight="bold" textAlign="right"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:50"/>

        <s:Label text="FIELD 1" left="leftColumn:0" top="mainRow:74" mouseEnabled="false" cacheAsBitmap="true" maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" />

        <s:Label text="FIELD 2" right="rightColumn:0" top="mainRow:74" textAlign="right" cacheAsBitmap="true" maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF"/>

        <s:Label id="field4" left="leftColumn:0" top="mainRow:94" fontSize="20" fontWeight="bold"/>

        <s:Label id="field5" right="rightColumn:0" top="mainRow:94" fontSize="20" fontWeight="bold" textAlign="right"/>

        <s:Label text="FIELD 4" left="leftColumn:0" top="mainRow:117" cacheAsBitmap="true"/>

        <s:Label text="FIELD 5" right="rightColumn:0" top="mainRow:117" textAlign="right" cacheAsBitmap="true"/>

        <!-- left side -->

        <s:Label id="field6" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:157"/>

        <s:Label text="FIELD 6" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:180"/>

        <s:Label id="field7" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:204"/>

        <s:Label text="FIELD 7" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF"  cacheAsBitmap="true"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:227"/>

        <s:Label id="field8" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:251"/>

        <s:Label text="FIELD 8" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:274"/>

        <s:Label id="field9" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:298"/>

        <s:Label text="FIELD 9" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:321"/>

        <s:Label id="field10" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:345"/>

        <s:Label text="FIELD 10" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:368"/>

        <s:Label id="field11" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:392"/>

        <s:Label text="FIELD 11" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="leftColumn:0" right="leftColumn:0" top="mainRow:415"/>

        <!-- right side -->

        <s:Label id="field12" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:157"/>

        <s:Label text="FIELD 12" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:180"/>

        <s:Label id="field13" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:204"/>

        <s:Label text="FIELD 13" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:227"/>

        <s:Label id="field14" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:251"/>

        <s:Label text="FIELD 14" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:274"/>

        <s:Label id="field15" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:298"/>

        <s:Label text="FIELD 16" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:321"/>

        <s:Label id="field17" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:345"/>

        <s:Label text="FIELD 17" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:368"/>

        <s:Label id="field18" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:392"/>

        <s:Label text="FIELD 18" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:415"/>

        <s:Label id="field19" fontSize="20" fontWeight="bold" textAlign="right" width="100%"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:439"/>

        <s:Label text="FIELD 19" textAlign="right" width="100%" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"

                 left="rightColumn:0" right="rightColumn:0" top="mainRow:462"/>

        <!-- bottom groups -->

        <s:Label text="FIELD 20" width="100%" left="leftColumn:0" right="rightColumn:0" top="operationRow:0" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"/>

        <s:Label id="field20" fontSize="16"

                 opaqueBackground="0xffffff"

                 paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5"

                 left="leftColumn:0" right="rightColumn:0" top="operationRow:20" bottom="operationRow:0"/>

        <s:Label text="FIELD 21" width="100%" left="leftColumn:0" right="rightColumn:0" top="commentsRow:0" mouseEnabled="false"  maxDisplayedLines="1"

                 fontSize="12" fontWeight="bold" color="0x0D71FF" cacheAsBitmap="true"/>

        <s:Label id="field21" fontSize="16"

                 opaqueBackground="0xffffff"

                 paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5"

                 left="leftColumn:0" right="rightColumn:0" top="commentsRow:20" bottom="commentsRow:0"/>

</s:View>

What am I missing in terms of performance?

This topic has been closed for replies.

1 reply

Pahup
Adobe Employee
Adobe Employee
September 21, 2012

Thanks for reporting it here, could you please consider it logging via bugbase.adobe.com and share the bug number here for reference.

-Pahup