4 Replies Latest reply on Aug 13, 2010 3:10 AM by Francisc

    List with Lots of Data Advice

    Francisc Level 3

      Hello!

       

      I have a List control that has started to get lots of data and images as well.

      Now, I am thinking about how to optimize this.

       

      I am thinking of maybe making pages instead of the vertical scroll it has now.

       

      Any thoughts or expericed with this kind of stuff?

       

      Thanks!

        • 1. Re: List with Lots of Data Advice
          fleRavix Level 2

          i suggest you to use xml for this type of issues. Because XML is flexible in handling lots of data. So, please get the data in the form of xml and in the front-end(flex) use,

          for each(item:xml in xmldata)

          {

               iterate accordingly

          }

           

          If you dont want to use xml, then you must go for the paging feature in your application. First get 1 - 20 records to the front end, if user clicks next, get the next records 21 - 40 etc..

          But, this technique need to send many requests to the server.

           

          Mark this if helpful..

          Bye

          • 2. Re: List with Lots of Data Advice
            Francisc Level 3

            Hi, there. XML is the slowest way to this this because of the large overhead.

             

            I am getting and sending data through AMF, which is the fastest.

             

            My question was about how to display data other than List with long vertical scrollbar.

             

            The paging option I think I mentioned in the initial post, and it can mean lots of server requests or just one getting all data and just paging it in Flex.

             

            Thanks though.

            • 3. Re: List with Lots of Data Advice
              David_F57 Level 5

              hi,

               

              The best way is to use virtuallayout which means that the displayed renderers are reused, this speeds up the scrolling process. you could also add navigation 'toolbar' with pageup/pagedown/start/end.

               

              Are the images retrieved with the data request or as required(i.e do you have a link in the data that calls the images as the item is rendered) ?

               

              David

              • 4. Re: List with Lots of Data Advice
                Francisc Level 3

                Hello, David!

                 

                The AMF service sends the URL for the image to be loaded rather than the image itself.

                 

                useVirtualLayout gave me some headaches when I first started making that list and since dropped it.

                The problems were about the item renderers which need to do some parsing of data do `decide` what to display and what not to.

                 

                The problem was the list was height 0 and not visible, then when changing states it got larger and visible.

                In the scenario above, only the itemRenderes that were on the top row did the parsing bit, the others did not, because with the low height they were offscreen and when they got on screen the parsing didn't occur.

                 

                I'll give it a go with useVirtualLayout again though and see if I can work-out something. Maybe refresh the dataProvider for the list and implemente a dataChange on the itemRenderer where the parsing of data is redone.

                 

                Sounds good?