2 Replies Latest reply on Feb 28, 2013 10:10 AM by Bramblethorne

    Why does List create an additional/extra orphaned ListItemRenderer?

    Bramblethorne Level 1

      Here's the trace.  Shown are the four addBlankItem() function calls that add an object to my DataProvider object.  Following that are trace statements generated from within the custom ListItemRenderer.  As can be seen, the 4 expected objects are created and have the proper context.  Following that however a fifth, extra, ListItemRenderer instance is created that has no parent and is obviously not in the context of the dataProvider/list.  This is quite a big problem as the view (because of the list and its renderers) takes fully 13 seconds of 'lock-up' time before displaying on the faster processor of an iPad2.  If that could be cut to 4/5ths of what it is now, all the better.  I'll provide the code for the dataprovider and list in a followup. Usefuls: Flash Builder 4.7 trial, Flex SDK 4.6.0, AIR 3.6, -swf-version=19, for iPad2 running iOS 6.1.2.

       




      protected function creationCompleteHandler():void



      {




      trace("LearnItListItemRenderer FUNCTION creationCompleteHander\n"+this+"\n"+this.parent);




      dataProxy = new ObjectProxy(data);







      dataProxy.choosePictureButton = null;//choosePictureButton;



      }

       

       

      itemList.creationComplete()

      MakeAToolBase FUNCTION toolBaseCreationCompleteHandler()

      MakeAToolLearnItView FUNCTION creationCompleteHandler

      MakeAToolLearnItView FUNCTION addBlankItem

      MakeAToolLearnItView FUNCTION addBlankItem

      MakeAToolLearnItView FUNCTION addBlankItem

      MakeAToolLearnItView FUNCTION addBlankItem

       

      LearnItListItemRenderer FUNCTION creationCompleteHander

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVie wNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSkin 13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.Li stSkin157.Scroller159.ScrollerSkin160.DataGroup158.LearnItListItemRenderer321

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSki n13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.L istSkin157.Scroller159.ScrollerSkin160.DataGroup158

       

      LearnItListItemRenderer FUNCTION creationCompleteHander

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVie wNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSkin 13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.Li stSkin157.Scroller159.ScrollerSkin160.DataGroup158.LearnItListItemRenderer396

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSki n13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.L istSkin157.Scroller159.ScrollerSkin160.DataGroup158

       

      LearnItListItemRenderer FUNCTION creationCompleteHander

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVie wNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSkin 13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.Li stSkin157.Scroller159.ScrollerSkin160.DataGroup158.LearnItListItemRenderer471

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSki n13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.L istSkin157.Scroller159.ScrollerSkin160.DataGroup158

       

      LearnItListItemRenderer FUNCTION creationCompleteHander

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVie wNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSkin 13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.Li stSkin157.Scroller159.ScrollerSkin160.DataGroup158.LearnItListItemRenderer246

      PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator1.ViewNavigatorSki n13.contentGroup.MakeAToolLearnItView153.SkinnableContainerSkin154.contentGroup.itemList.L istSkin157.Scroller159.ScrollerSkin160.DataGroup158

       

      LearnItListItemRenderer FUNCTION creationCompleteHander

      LearnItListItemRenderer171

      null

        • 2. Re: Why does List create an additional/extra orphaned ListItemRenderer?
          Bramblethorne Level 1

          You're saying that this is an intended functionality?

           

          Forgive my ignorance, but am I correct in understanding you to mean that -4- complete renderers are fully created and available for measurement -before- a 5th useless wasteful renderer is created to suck up resources that I absolutely don't have to be wasted?

           

          I only discovered this because I was trying to diagnose absolutely horrid performance issues.

           

          Can this be stopped/prevented?  Am I making incorrect assumptions as to how things work?

           

          Years of schooling have drilled the concept of -not- wasting resources into me...  It's a good thing to beat the teacher of the assembly language course by writing a program that beats his execution, and there we're talking about counting -operations- .  This goes far beyond a few extra clock cycles or operations or memory buffer swaps *chuckle*  The renderer takes FOREVER and halts the program.

           

          Aurgh!  Please please, better news than this!