1 Reply Latest reply on Jan 19, 2010 3:43 AM by chriswyl

    performance building Tile Flex 3 and List Flex 4

    chriswyl

      Hi,

       

       

      I'm writing aplication in FlashBuilder, I see that building Tile with repeaters(Flex 3) is 3-4 time faster that FB

       

      and I don't know what I do wrong,

       

      it is My Code in Flex 3

       

      <mx:Tile>
                      <mx:Repeater id="dayRepeater" dataProvider="{ arr }" >
                          <mx:Canvas width="78" height="38" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
                                <calendar:CalRenderer dataProvider = "{ dayRepeater.currentItem as DataVO }"/>
                          </mx:Canvas>
                      </mx:Repeater>
                  </mx:Tile>

       

       

      and inside repeater is following code

       

      ..........

      <mx:Canvas>
              <mx:Image x="0" y="0" width="78" height="38" source="{ dataProvider.renBackUrl}" scaleContent="true" maintainAspectRatio="false" verticalAlign="middle" horizontalAlign="center"/>
          </mx:Canvas>
          <mx:Canvas x="{dataProvider.imgIcoX}" y="{dataProvider.imgIcoY}" width="24" height="26">
              <mx:Image width="20" height="20" source="{ dataProvider.holyico}" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" horizontalAlign="center"/>
          </mx:Canvas>
          <mx:Text id="renTxt" styleName="{dataProvider.txtIdFont}" x="{dataProvider.txtIdX}" y="{dataProvider.txtIdY}" text="{dataProvider.id}" width="51.5" height="34.149994" fontSize="22"  textAlign="right"  fontWeight="normal" color="{dataProvider.renMainTxtColor}" selectable="false"/>
          <mx:Text styleName="{dataProvider.txtNameFont}" x="{dataProvider.txtNameX}" y="{dataProvider.txtNameY}" text="{dataProvider.names}" width="100%" height="10.799999" fontSize="6" textAlign="right" color="{dataProvider.renMainTxtColor}" selectable="false"/>
          <mx:TextArea styleName="{dataProvider.txtHolyFont}" x="{dataProvider.txtHolyX}" y="{dataProvider.txtHolyY}" width="80" height="13.099998" text="{dataProvider.holy}" fontSize="7"  borderStyle="none" backgroundAlpha="0.0" editable="false" cornerRadius="0" color="{dataProvider.renMainTxtColor}" textAlign="right" selectable="false"/>
      ..........   

       

       

       

       

      In the FB4 the code looks like this

       

      <s:List id="myList" height="100%" width="100%" x="17" y="30"
                     dataProvider="{arr}"
                  itemRenderer="gui.views.ProjectView.CalItemRenderer" >
              <s:layout>
                  <s:TileLayout/>
              </s:layout>
             
          </s:List>

       

       

      and renderer look.

       

      ......

          <mx:Canvas>
              <mx:Image x="0" y="0" width="78" height="38" source="{ dataProvider.renBackUrl}" scaleContent="true" maintainAspectRatio="false" verticalAlign="middle" horizontalAlign="center"/>
          </mx:Canvas>
          <mx:Canvas x="{data.imgIcoX}" y="{data.imgIcoY}" width="24" height="26">
              <mx:Image width="20" height="20" source="{ data.holyico}" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" horizontalAlign="center"/>
          </mx:Canvas>
          <!--<s:Rect width="50" height="50" fill.normal="{fill}" fill.hovered="{overfill}" fill.selected="{fill}" bottomLeftRadiusX="5" topRightRadiusX="5" stroke="{borderStroke}"/>-->
          <!--<s:Label text="{data.maskPrvUrl}" color.hovered="0x1313cd" color.selected="0x000000" verticalAlign="bottom"/>-->
          <s:TextArea styleName="{data.txtIdFont}"   x="{data.txtIdX}"   y="{data.txtIdY}"   text="{data.id}"    width="51.5" height="34.149994" fontSize="22" borderVisible="false" borderAlpha="0.0" textAlign="right" color="{data.renMainTxtColor}" fontWeight="normal"  editable="false" selectable="false" contentBackgroundAlpha="0"/>
          <s:TextArea styleName="{data.txtNameFont}" x="{data.txtNameX}" y="{data.txtNameY}" text="{data.names}" width="100%" height="10.799999" fontSize="6"  borderVisible="false" borderAlpha="0.0" textAlign="right" color="{data.renMainTxtColor}" editable="false" selectable="false" contentBackgroundAlpha="0"/>
          <s:TextArea styleName="{data.txtHolyFont}" x="{data.txtHolyX}" y="{data.txtHolyY}" text="{data.holy}"  width="80"   height="13.099998" fontSize="7"  borderVisible="false" borderAlpha="0.0" textAlign="right" color="{data.renMainTxtColor}"  editable="false" selectable="false" contentBackgroundAlpha="0"/>
          ....

       

      arr is ArrayCollection;

       

      Generaly when I run aplication made witth Flex 3 - Tile is completed after  2-3 sec. In FB4 with SDK10485 - after 6-7 sec.!!!

       

      Do you have any idea?

       

      Thx

       

      Chris