9 Replies Latest reply on Feb 19, 2012 1:40 AM by mikmiki

    delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile

    mikmiki

      i have  a terrible peformance issue with iOS mainly.

      except there is a noticeable delay from the time pushView/popView is called until the transition starts.

      i'm using a back button on a view as below:

       

      <s:Button

       

      id="backButton" label="Back" click="backButton_clickHandler(event)" styleName="backButton"

      />

       

      the click event fires the following:

       

       

       

       

       

      navigator.popView();

       

      the view is popped only after 3-7 seconds,

      anyone encountered it?

        • 1. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
          Level 1

          There is a lot of information about AIR mobile optimizations.

           

          I shouldnt user creationComplete but viewActivate.

          I should keep your more used view in memory.

          Etc....

          • 2. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
            mikmiki Level 1

            i have done all the above.

            1.creationComplete->viewActivate

            2.DestructionPolicy=never.

            3.remove containers\SkinnableContainer and so on.

            4.keep images in cache.

            result- no use. still 4-10(!) seconds transition time between each view.

            the  funny thing is that the view that i am popping to is in memory.

            any more ideas?

            • 3. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
              Level 1

              I never tested in iOS but in Android with all the optimizations that you spoken it's in own second (HTC Desire 1 GHZ)

               

              Use of SQLite (that is eavy for mobile), some complex views, throusand of records in main table and tens of records that is cached at the boot etc ...

               

              Before all optimizations (including SQLite optimizations) and with AIR 2.7:

              -> App boot: 7-10 seconds

              -> View change: 3-4 seconds

               

              After all optimizations that you spoken + SQLite optimizations + AIR 3.1 update:

              -> App boot: 2.5-3 seconds

              -> View change (first time): +- 1-2 second (depend of the complexity of the view)

              -> View change (second time): Instant (independent of the complexity of the view)

               

              Do you use SQLite in your project ?

              If so, there is a lot of optimizations that in desktop does not have a major impact but in mobile make the difference from night to day

              • 4. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
                mikmiki Level 1

                the optimizations (i don't use SQLLite) have helped the android version but the iOS version is yet very slow especially in the transition time between views.

                in first view (TabbedViewNavigator) i have solved it by DestructionPolicy=never which helps reduce the time in the second and above click on the view, but with view i have to user PushView i need to solve the issue.

                no one encountered a performance issues on iOS?

                • 5. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
                  mikmiki Level 1

                  anyone? is it time to say - flex mobile isn't good enough for iOS?

                  • 6. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
                    Level 1

                    I believe that if you put here some code (that sail two views that navigate each other) can help others to help you

                    • 7. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
                      mikmiki Level 1

                      with pleasure:

                       

                       

                      view1 which is calling view2 when clicking on row in list:

                      <?xml version="1.0" encoding="utf-8"?>
                      <components:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:components="spark.components.*"
                           xmlns:components1="com.mobile.shared.components.*"
                           xmlns:supportClasses="spark.skins.mobile.supportClasses.*"
                           xmlns:Skins="com.mobile.rates.Skins.*"
                           title="{presenter.culture.ttlRates}" xmlns:assets="assets.*" destructionPolicy="never" xmlns:application="com.mobile.application.*">

                      <components:viewMenuItems>
                        <s:ViewMenuItem label="{presenter.culture.menuSettings}"  icon="{IconSettings}" click="ViewMenuHelper.settings(navigator)"   />
                        <s:ViewMenuItem label="{presenter.culture.menuHelp}"  icon="{IconHelp}"  click="ViewMenuHelper.help(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuSupport}" icon="{IconSupport}" click="ViewMenuHelper.help(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuDisclaimer}"  icon="{IconDisclaimer}" click="ViewMenuHelper.disclaimer(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuAbout}"  icon="{IconAbout}" click="ViewMenuHelper.about(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuLogOut}"  icon="{IconLogout}" click="ViewMenuHelper.logout(navigator)"/>
                      </components:viewMenuItems>

                      <components:layout>
                        <s:VerticalLayout gap="0" paddingBottom="7" paddingTop="7" horizontalAlign="center" />
                      </components:layout>

                      <fx:Script>
                         <![CDATA[
                          import assets.SearchBg;
                          import assets.android.viewMenu.IconAbout;
                          import assets.android.viewMenu.IconDisclaimer;
                          import assets.android.viewMenu.IconHelp;
                          import assets.android.viewMenu.IconLogout;
                          import assets.android.viewMenu.IconSettings;
                          import assets.android.viewMenu.IconSupport;
                         
                          import com.asfusion.mate.core.GlobalDispatcher;
                          import com..core.events.BusyIndicatorEvent;
                          import com..mobile.rates.presenters.RatesPresenter;
                          import com..mobile.rates.renderers.RatesSymbolRenderer;
                          import com..mobile.shared.helpers.ViewMenuHelper;
                         
                          import mx.collections.ArrayCollection;
                          import mx.rpc.events.ResultEvent;
                         
                          import spark.core.ContentCache;
                         
                          private var rendererApproved:Boolean;
                         
                          private var fxg:SearchBg = new SearchBg();
                         
                          public static var dispatcher : GlobalDispatcher = new GlobalDispatcher();
                         
                          private function clickHandler(event:MouseEvent):void
                          {
                            var pEvent:BusyIndicatorEvent = new BusyIndicatorEvent(BusyIndicatorEvent.BUSY_INDICATOR_ON);
                           dispatcher.dispatchEvent(pEvent);
                           // TODO Auto-generated method stub
                           if(myGrid.selectedItem != null)
                           {
                            navigator.pushView(View2,myGrid.selectedItem);
                           }
                          
                          }
                         
                          [Bindable]
                          public var presenter:com..mobile.tweets.presenters.tweetsPresenter;
                          public var tweets:ArrayCollection = new ArrayCollection;
                         
                         
                         
                          protected function tweets_resultHandler(event:ResultEvent):void
                          {
                          
                           var i:Number = 0;
                           var tweetsCollection:ArrayCollection = new ArrayCollection;
                           tweetsCollection = event.result.Usertweets;
                          
                          
                           for(i; i<tweetsCollection.length;i++)
                           {
                            var tweetsInsert:Object = new Object;
                            tweets.addItem(tweetsInsert);
                           }
                          
                          
                          }
                         
                          [Bindable]
                          static protected var s_c:ContentCache=new ContentCache();
                         
                         ]]>
                        </fx:Script>

                        <fx:Declarations>
                        
                        </fx:Declarations>

                        <fx:Style>
                         @namespace s "library://ns.adobe.com/flex/spark";
                         @namespace s "library://ns.adobe.com/flex/spark";
                         @namespace mx "library://ns.adobe.com/flex/mx";
                         @namespace spark "spark.skins.spark.*";
                         s|Label #label
                         {
                          font-family: "MyriadPro";
                          src: url("fonts/myriadpro-regular.otf");
                          embedAsCFF: true;
                         }
                        

                        
                        </fx:Style>


                      <components1:Header width="100%"  />

                        <s:Spacer height="5" />
                      <!--<s:BitmapImage  scaleMode="stretch"
                           source="{SearchBg}" width="98%" height="56" horizontalCenter="0" />-->
                        <s:SkinnableContainer top="5" id="skind" width="98%" height="60" skinClass="com..mobile.tweets.Skins.TopRoundedCornerSkin"
                               >
                         <s:BitmapImage 
                             source="{SearchBg}" width="100%" contentLoader="{s_c}">
                         
                          <s:mask>
                           <s:BorderContainer id="bmpMask"
                                  cornerRadius="6"
                              width="{skind.width}" height="{skind.height}" />
                          </s:mask>
                         
                         </s:BitmapImage>
                          <components1:FilterText left="10" top="10" restrict="A-Z" width="60%" height="70%" alpha="0.5" compareField="InstrumentName" borderVisible="true"
                                dataProvider="{presenter.tweets}" />
                        
                        </s:SkinnableContainer>
                      <s:SkinnableContainer  id="contentContainer"  height="100%"   width="98%" horizontalCenter="0" >
                        <!--<s:BorderContainer id="insideContainer"  width="98%" height="100%" borderAlpha="0.3" borderWeight="1" borderColor="gray">-->
                        <s:List id="myGrid" width="100%" height="100%"
                          click="clickHandler(event)"
                          dataProvider="{presenter.tweets}" 
                          itemRenderer="com..mobile.tweets.renderers.tweetsSymbolRenderer"
                          selectionColor="#D8D8D8" textAlign="center" useVirtualLayout="false">
                        </s:List>
                       
                      </s:SkinnableContainer>
                      </components:View>

                       

                       

                      view 2 is popped to view 1 when clicking on back button:

                      <?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"
                           xmlns:components="spark.components.*"
                           xmlns:components1="com..mobile.shared.components.*"
                           xmlns:supportClasses="spark.skins.mobile.supportClasses.*"
                           xmlns:Skins="com..mobile.rates.Skins.*"
                           xmlns:renderers="com..mobile.rates.renderers.*"
                           xmlns:LiveGraph="com..mobile.shared.LiveGraph.*"
                           xmlns:helpers="com..core.helpers.*"
                           xmlns:components2="com..core.components.*"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           xmlns:application="com..mobile.application.*"
                           viewActivate="init()" currentState="portraitState" destructionPolicy="never"
                           removedFromStage="view1_removedFromStageHandler(event)"
                           title="{presenter.culture.ttlOpenManual}" xmlns:CustomCombo="com..mobile.shared.components.CustomCombo.*">

                      <s:viewMenuItems>
                        <s:ViewMenuItem label="{presenter.culture.menuSettings}"  icon="{IconSettings}" click="ViewMenuHelper.settings(navigator)"   />
                        <s:ViewMenuItem label="{presenter.culture.menuHelp}"  icon="{IconHelp}"  click="ViewMenuHelper.help(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuSupport}" icon="{IconSupport}" click="ViewMenuHelper.support(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuDisclaimer}"  icon="{IconDisclaimer}" click="ViewMenuHelper.disclaimer(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuAbout}"  icon="{IconAbout}" click="ViewMenuHelper.about(navigator)" />
                        <s:ViewMenuItem label="{presenter.culture.menuLogOut}"  icon="{IconLogout}" click="ViewMenuHelper.logout(navigator)"/>
                      </s:viewMenuItems>

                      <!--<s:layout>
                        <s:VerticalLayout horizontalAlign="center" paddingBottom="7" paddingTop="7"/>
                      </s:layout>-->
                      <fx:Declarations>
                        <helpers:TweetsHelper id="TweetsHelper"
                               tweetName="{data.tweetName.toString()}" SLminimun="0"/>
                        <s:NumberFormatter id="nf"/>
                        <s:Button id="backButton" label="Back" click="backButton_clickHandler(event)"  styleName="backButton"/>
                      </fx:Declarations>

                      <fx:Script>
                        <![CDATA[
                         import assets.OpenManualBg;
                         import assets.android.viewMenu.IconAbout;
                         import assets.android.viewMenu.IconDisclaimer;
                         import assets.android.viewMenu.IconHelp;
                         import assets.android.viewMenu.IconLogout;
                         import assets.android.viewMenu.IconSettings;
                         import assets.android.viewMenu.IconSupport;
                        
                         import com.asfusion.mate.core.GlobalDispatcher;
                         import com..core.constants.ServerConstants;
                         import com..core.events.BusyIndicatorEvent;
                         import com..core.helpers.TweetsHelper;
                         import com..core.login.LoginEvent;
                         import com..core.model.ModelProxy;
                         import com..mobile.more.helpers.MailHelper;
                         import com..mobile.more.views.AboutView;
                         import com..mobile.more.views.AccountSettingsView;
                         import com..mobile.more.views.DisclamierView;
                         import com..mobile.more.views.HelpView;
                         import com..mobile.Tweets.events.PositionEvent;
                         import com..mobile.shared.LiveGraph.presenters.WebPresenter;
                         import com..mobile.shared.components.Alert;
                         import com..mobile.shared.helpers.ViewMenuHelper;
                        
                         import mx.events.ValidationResultEvent;
                        
                         import spark.core.ContentCache;
                         import spark.formatters.NumberFormatter;
                        
                         private var recognizeMachine:String;
                        
                         public static var dispatcher : GlobalDispatcher = new GlobalDispatcher();
                        
                         [Bindable]
                         protected var modelProxy:ModelProxy = new ModelProxy();
                        
                         /* [Bindable]
                         public var presenter:com..mobile.rates.presenters.RatesPresenter;  */
                         [Bindable]
                         public var presenter:com..mobile.shared.LiveGraph.presenters.WebPresenter;
                        
                         [Bindable]
                         public var SenderTypeID:int;
                         [Bindable]
                         public var PositionType:String;
                        
                         [Bindable]
                         public var askBidType:String;
                        
                         [Bindable]
                         public static var minAmountValue:Number;
                        
                         [Bindable]
                         public static var defaultAmountValue:String;
                        
                         [Bindable]
                         public static var amountJump:Number;
                        
                         [Bindable]
                         public static var minPauseValue:Number;
                        
                         [Bindable]
                         public static var maxPauseValue:Number;
                        
                         [Bindable]
                         public static var pauseJump:Number;
                        
                         [Bindable]
                         public static var pipsJump:Number;
                        
                        
                         private function init():void
                         {
                         
                         
                          if(data != null)
                          {
                           switch (modelProxy.details.UserAccountTypeID)//checking for the defualt amount.
                           {
                            case ServerConstants.ACCOUNT_TYPE_MICRO:
                             minAmountValue = modelProxy.groupStruct.ACCOUNT_MICRO_MIN_VALUE;
                             defaultAmountValue = modelProxy.groupStruct.ACCOUNT_MICRO_DEFAULT_VALUE;
                             amountJump = modelProxy.groupStruct.ACCOUNT_MICRO_AMOUNT_JUMP;
                             break;
                            case ServerConstants.ACCOUNT_TYPE_MINI:
                             minAmountValue = modelProxy.groupStruct.ACCOUNT_MINI_MIN_VALUE;
                             defaultAmountValue = modelProxy.groupStruct.ACCOUNT_MINI_MIN_VALUE;
                             amountJump = modelProxy.groupStruct.ACCOUNT_MINI_AMOUNT_JUMP;
                             break;
                            case ServerConstants.ACCOUNT_TYPE_MINIME:
                             minAmountValue = modelProxy.groupStruct.ACCOUNT_MINIME_MIN_VALUE;
                             defaultAmountValue = modelProxy.groupStruct.ACCOUNT_MINIME_MIN_VALUE;
                             amountJump = modelProxy.groupStruct.ACCOUNT_MINIME_AMOUNT_JUMP;
                             break;
                            case ServerConstants.ACCOUNT_TYPE_STANDART:
                             minAmountValue = modelProxy.groupStruct.ACCOUNT_STANDARD_MIN_VALUE;
                             defaultAmountValue = modelProxy.groupStruct.ACCOUNT_STANDARD_MIN_VALUE;
                             amountJump = modelProxy.groupStruct.ACCOUNT_STANDARD_AMOUNT_JUMP;
                             break;
                           }
                          
                           cmbTimeFrame.addEventListener(Event.CHANGE,oNTimeFrameChanged);
                           //cmbTimeFrame.selectedItem = graph.timeFrameDP[1];
                           graph.fetchCandleRates(data.InstrumentID, data.tweetName, graph.timeFrameDP[0].bo, graph.timeFrameDP[0].period);//"1", modelProxy.groupStruct.DEFAULT_LIVE_CHART_TIMEFRAME);
                           /* presenter.instrumentID = data.InstrumentID;
                           presenter.tweetName = data.tweetName;
                           presenter.candelTimeID = "1";//graph.resolveCandelTimeFrame(modelProxy.groupStruct.DEFAULT_LIVE_CHART_TIMEFRAME);
                           presenter.candelTimeFrame = modelProxy.groupStruct.DEFAULT_LIVE_CHART_TIMEFRAME;
                          
                           dispatcher.dispatchEvent(new LiveGraphEvent(LiveGraphEvent.CONTROLLER_GET_CANDLE_RATES)); */
                           //LiveGraphController.fireCandleDataRequest();
                          
                            var pEvent:BusyIndicatorEvent = new BusyIndicatorEvent(BusyIndicatorEvent.BUSY_INDICATOR_OFF);
                           dispatcher.dispatchEvent(pEvent);

                           if(buyRb.selected == true)
                           {
                            SenderTypeID = 1;
                            PositionType = 'Buy';
                            askBidType = 'Ask';
                           }
                           else
                           {
                            SenderTypeID = 2;
                            PositionType = 'Sell';
                            askBidType = 'Bid';
                           }
                          
                           stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE,StageOrientationEventHand ler);
                          
                          
                           TweetsHelper.buySellType = TweetsHelper.getBuySellType(PositionType);
                           TweetsHelper.tweetName = data.tweetName;
                           TweetsHelper.SLminimun = 2;
                          }
                          // TODO Auto-generated method stub
                          if (flash.system.Capabilities.version.substr(0,3) == "IOS")
                          {                 
                           this.navigationContent = [backButton];               
                          }
                         
                         }
                        
                         private function StageOrientationEventHandler(event:StageOrientationEvent):void
                         {
                          switch (event.afterOrientation)
                          {
                           case StageOrientation.DEFAULT:
                            currentState = 'portraitState';
                            break;
                           case StageOrientation.ROTATED_RIGHT:
                            currentState = 'landscapeState';
                            break;
                           case StageOrientation.ROTATED_LEFT:
                            currentState = 'landscapeState';
                            break;
                           case StageOrientation.UPSIDE_DOWN:
                            currentState = 'portraitState';
                            break;
                           case StageOrientation.UNKNOWN:
                            currentState = 'portraitState';
                            break;
                          }
                         
                         }
                        
                         protected function Submit(event:MouseEvent):void
                         {
                          //some action
                         }
                        
                        
                         protected function amountHandler():void
                         {
                          nf = new spark.formatters.NumberFormatter();
                          amountInput.text = nf.format(amountInput.text);
                         }
                        
                        
                        
                        
                        
                         protected function view1_removedFromStageHandler(event:Event):void
                         {
                          presenter.removeCandlesData();
                         }
                        
                         protected function nv_invalidHandler(event:ValidationResultEvent):void
                         {
                          // TODO Auto-generated method stub
                         
                         }
                         [Bindable]
                         static protected var s_c:ContentCache=new ContentCache();
                        
                         protected function oNTimeFrameChanged(event:Event):void
                         {
                          var cmb:CustomComboButton = event.currentTarget as CustomComboButton;
                          graph.timeFrameChanged = true;
                          graph.fetchTweets(data.TweetID, data.tweetName, cmb.selectedItem.bo, cmb.selectedItem.period);
                         }
                        
                         protected function backButton_clickHandler(event:MouseEvent):void
                         {
                          // TODO Auto-generated method stub
                          navigator.popView();
                         }
                        
                        ]]>
                      </fx:Script>
                      <s:states>
                        <s:State name="portraitState"/>
                        <s:State name="landscapeState"/>
                      </s:states>

                      <s:VGroup width="100%" gap="5" height="100%" horizontalAlign="center" paddingBottom="7" paddingTop="7">
                        <components1:Header width="100%" horizontalCenter="0"/>
                        <s:VGroup includeIn="portraitState" width="100%" gap="0" paddingLeft="12" paddingRight="12">
                         <s:SkinnableContainer id="skind" width="100%" height="100%"
                                skinClass="com..mobile.rates.Skins.TopRoundedCornerSkin">
                          <s:BitmapImage width="100%" height="100%" contentLoader="{s_c}" scaleMode="stretch"
                                source="{OpenManualBg}">
                           <s:mask>
                            <s:BorderContainer id="bmpMask" width="{skind.width}" height="{skind.height}"
                                   cornerRadius="6"/>
                           </s:mask>
                          </s:BitmapImage>
                          <s:Label text="{data.tweetName}" fontSize="33" fontWeight="bold" left="10" top="10" />
                          <s:HGroup gap="10" verticalAlign="bottom" top="40" left="10" >
                           <s:RadioButton  fontSize="33" id="buyRb" selected="true" click="{SenderTypeID = 1;PositionType = 'Buy';askBidType = 'Ask';}" label="{presenter.culture.lblBuy}" groupName="buySellGroup"  />
                           <renderers:RatesRenderer  paddingTop="20" width="30%"  id="askField" verticalAlign="middle"   data="{data.Ask}"
                                   textAlign="right" horizontalAlign="right"
                                   />
                           <s:RadioButton fontSize="33" label="{presenter.culture.lblSell}" click="{SenderTypeID = 2;PositionType = 'Sell';askBidType = 'Bid';}"  id="sellRb"  groupName="buySellGroup"  />
                           <renderers:RatesRenderer paddingTop="20" width="30%"  id="bidField" verticalAlign="middle"   data="{data.Bid}"
                                  textAlign="right" horizontalAlign="right"
                                  />
                          </s:HGroup>
                         </s:SkinnableContainer>
                        </s:VGroup>
                        <!--<s:SkinnableContainer  id="skind2" width="100%">-->
                        <s:Scroller id="scroller" width="98%" height="25%"
                           minHeight="{(formVgroup.height - TweetstopLimit.height) -15}"
                           horizontalCenter="0">
                         <s:Group id="scrollerGroup" width="100%">
                          <s:VGroup id="formVgroup" width="100%" gap="-10" paddingBottom="10">
                           <s:FormItem backgroundAlpha="0" width="98%" label="{presenter.culture.lblAmount}" fontSize="30">
                            <s:TextInput id="amountInput" width="100%" focusOut="amountHandler()"
                                maxChars="4" prompt="{presenter.culture.lblpromtUnits}"
                                restrict="0-9" text="{defaultAmountValue}"/>
                           </s:FormItem>
                           <s:FormItem width="40%" label="{presenter.culture.lblOrderType}" fontSize="30" backgroundAlpha="0">
                            <s:RadioButton id="marketRb" width="40%" label="Market"
                                  click="priceOpenHandler()" fontSize="30"
                                  groupName="marketPriceGroup" selected="true"/>
                            <s:HGroup>
                             <s:RadioButton id="priceOpen" click="priceOpenHandler()"
                                   groupName="marketPriceGroup"/>
                             <s:TextInput id="priceOpenText" width="34%" enabled="false"
                                 prompt="{presenter.culture.lblpromtEntry}"/>
                            </s:HGroup>
                           </s:FormItem>
                           <s:Spacer height="50"/>
                           <components2:TweetstopLimit id="TweetstopLimit" width="100%"
                                     TweetsHelper="{TweetsHelper}"/>
                          </s:VGroup>
                         </s:Group>
                        </s:Scroller>
                        <s:Group width="100%">
                         <s:Button id="AdvanceB" label="{presenter.culture.btnAdvanced}" click="{(175 > scrollerGroup.verticalScrollPosition) ? scrollerGroup.verticalScrollPosition = 197 : scrollerGroup.verticalScrollPosition = 0};scroller.enabled = true"  bottom="0" left="5" />
                         <s:Button click="Submit(event)" bottom="0" right="5"  width="{AdvanceB.width}" label="{presenter.culture.btnSend}" />
                        </s:Group>
                        <s:Group width="98%" height="45%">
                         <LiveGraph:LiveGraph id="graph" horizontalCenter="0"/> 
                         <CustomCombo:CustomComboButton  id="cmbTimeFrame" width="150" height="40" top="10" left="10"
                                 dataProvider="{graph.timeFrameDP}"
                                 labelField="label"
                                 selectedItem="{graph.timeFrameDP.getItemAt(0)}"
                                 Title="{presenter.culture.ttlTimeFrame}" IosOptionsMenu="{timeFrameOptions}"
                                 skinClass="com..mobile.shared.skins.TimeFrameButtonSkin"
                                 visible="{!graph.chartLoading}"
                                 />
                         <!--selectedItem="{TweetsGlobal.currentSelectedTimeFrame}"-->
                        </s:Group>
                      </s:VGroup>

                      <components1:PopUpSpinnerList id="timeFrameOptions" Width="{this.width}" options="{graph.timeFrameDP}" InitialY="{this.height}"
                                itemRenderer="com..mobile.shared.LiveGraph.renderers.TimeFrameRenderer"/>
                      <!--</s:SkinnableContainer>-->
                      </s:View>

                      • 8. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
                        Level 1

                        Don't get me wrong but when I saw your code I was scared

                        No wonder it gets so slow.

                         

                        You have too many containers within containers that cause redundant recalculations (in web/desktop environment you dont see the consequences of this but in mobile its another story).

                         

                        For example:

                         

                           <s:Group id="scrollerGroup" width="100%">

                            <s:VGroup id="formVgroup" width="100%" gap="-10" paddingBottom="10">

                             <s:FormItem backgroundAlpha="0" width="98%" label="{presenter.culture.lblAmount}" fontSize="30">

                              <s:TextInput id="amountInput" width="100%" focusOut="amountHandler()"

                                  maxChars="4" prompt="{presenter.culture.lblpromtUnits}"

                                  restrict="0-9" text="{defaultAmountValue}"/>

                             </s:FormItem>

                             <s:FormItem width="40%" label="{presenter.culture.lblOrderType}" fontSize="30" backgroundAlpha="0">

                              <s:RadioButton id="marketRb" width="40%" label="Market"

                                    click="priceOpenHandler()" fontSize="30"

                                    groupName="marketPriceGroup" selected="true"/>

                              <s:HGroup>

                               <s:RadioButton id="priceOpen" click="priceOpenHandler()"

                                     groupName="marketPriceGroup"/>

                               <s:TextInput id="priceOpenText" width="34%" enabled="false"

                                   prompt="{presenter.culture.lblpromtEntry}"/>

                              </s:HGroup>

                             </s:FormItem>

                             <s:Spacer height="50"/>

                             <components2:TweetstopLimit id="TweetstopLimit" width="100%"

                                       TweetsHelper="{TweetsHelper}"/>

                            </s:VGroup>

                           </s:Group>

                         

                        Why dont just use a Form with layout constraints instead of VGroup inside Group with all these recalculations ?

                         

                        You also have to many bindings. Even put your views in memory this will cause performance problems.

                        Just put variables and update the ui components when necessary and in the only right moment.

                         

                        Hope this help a little for now

                        • 9. Re: delay from the time pushView/popView is called until the transition starts on flex 4.6 mobile
                          mikmiki Level 1

                          hi,

                          i have reduced the number of containers but still got a long waiting after pressing the click that causes the push view. this does not explain that when i pop the view (altough the first view is DestructionPolicy=never meaning its still in memory) it takes 7-10 seconds until we see it.

                          to solve the porblem of the pushView for complex views i'm using the below implementation:

                          1.   i've created two states ("ready" and "notReady"). Initial state="notReady"

                          2,i mark the most top container in includeIn="ready"

                          3. on "ViewActiate" i'm creating a one time timer for 100 Ms interval that changes the state to "ready".

                          thia causes a smoother transition between views. is it the way to do it properly?

                          thanks.