0 Replies Latest reply on Apr 16, 2012 5:44 AM by lillitush

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

    lillitush

      I've asked this question before with no solution...terrible peformance issue with iOS mainly. 

      there is a noticeable delay from the time popView is called until the transition starts

      i have an almost empty view with the a back button to a first view which its DestructionPolicy is never.

        

      <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!

      i have done all recommended optimizations:

      1.use creationComplete but viewActivate.

      2. use only mobile optimized contorls.

      3. use only MobileSkin and not Spark Skin.

      4. remove nested groups.

      5. cache images.

      the view that is popping back (i think it's releavant becuase the second view is almost empty.

      <?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="mobile.shared.components.*"
           xmlns:supportClasses="spark.skins.mobile.supportClasses.*"
           xmlns:Skins="mobile.rates.Skins.*" skinClass="mobile.shared.skins.ActionScriptSkins.views.ViewBackgroundSkin"
           title="{presenter.culture.ttlRates}" xmlns:assets="assets.*" destructionPolicy="never" xmlns:application="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"  />
      </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 core.events.BusyIndicatorEvent;
          import mobile.rates.presenters.RatesPresenter;
          import mobile.rates.renderers.RatesSymbolRenderer;
          import 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();
          [Bindable]
          public var presenter:RatesPresenter;
          public var rates:ArrayCollection = new ArrayCollection;
         
         
         
        
          [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>

        <s:SkinnableContainer  id="skind" width="100%" height="60" skinClass="mobile.rates.Skins.TopRoundedCornerSkinAS" >
          <components1:FilterText left="10" top="10" restrict="A-Z" width="60%" height="70%" alpha="0.5" compareField="InstrumentName" borderVisible="true"
                dataProvider="{presenter.rates}" />
        </s:SkinnableContainer>
        <s:List id="myGrid" width="100%" height="100%"
          click="clickHandler(event)"
          dataProvider="{presenter.rates}"
          itemRenderer="SymbolRenderer"
          selectionColor="#D8D8D8" textAlign="center" useVirtualLayout="false">
        </s:List>

      </components:View>