4 Replies Latest reply on Mar 21, 2008 4:28 PM by FlexBeginner

    DataGrid and List - Maximum Size

    FlexBeginner
      Hi,

      This is probably an old chestnut, but I couldn't find an answer anywhere (except the usual "Why would you want to do that" :-) so here goes: -

      Is it possible to increase the Maximum number of elements for a DataGrid (or a List)? I believe the 5000 limit to be pretty "hard" because of some architected bit-map restrictions, but is there anyway to get around the limit with say read-only (except for sorting) DataProviders?

      If not then can we, via the wonders of FABridge, have a html/DOM <option> collection as the array source for a Flash ArrayCollection? i.e. The Select List would be in the JavaScript/html part of the page and the Flex PieChart would be in the SWF part, but only one copy of the data (the array) in memory.

      Cheers Richard Maher
        • 1. Re: DataGrid and List - Maximum Size
          ntsiii Level 3
          What do you mean by "elements"?
          Tracy
          • 2. Re: DataGrid and List - Maximum Size
            FlexBeginner Level 1
            Elements of the DataProvider array?
            items in the ArrayCollection?
            Rows?

            Sorry if I was unclear.

            Cheers Richard Maher

            PS. What does the Flex 3 reference documentation for DataGrid mean by 5000 by 5000? (I went for rows and columns. Are you saying that a one column DataGrid can have 5000 more rows than a 5000 column DataGrid?)
            • 3. Re: DataGrid and List - Maximum Size
              ntsiii Level 3
              Ok, I looked that up and found the reference you are describing.

              Those numbers must refer to the column count and the rowCount properties of a DG.

              Even assuming you really wanted 5000 columns, there is no reason to specify a rowCount that high.

              Such a grid would be unusable, as it would take a horrendous amount of time to render. An hour?

              There is no practical limit to the number of rows you can display. Set a rowCount to maybe 20, and let the DG scroll.

              The list-based components are optimized for performance, and If you let them, they will provide acceptable performance on 10,000 rows. Of course the user would have to wait for the data to get to flex, which would depend on the bandwidth and the total payload, which are not under the control of the DG.

              As you implied, however, one would still never do this. You would use a paged methodology to access the data the user actually needs, rather than get 10000 records.

              so the answer to your question is that you could probably hit this limit if you tried, as an academic exercise, but it will never affect you in a real world scenario.

              Tracy

              • 4. Re: DataGrid and List - Maximum Size
                FlexBeginner Level 1
                Hi Tracy,

                Thanks for the reply.

                > Those numbers must refer to the column count and the rowCount properties of a DG.

                I also used to be that certain, but have now become a swing voter :-)

                I suppose the real (and very simple) question is "What does the 5000 x 5000 maximum limit apply to?". I've had someone just tell me that it's got nothing to do with rows and columns in the datagrid and is actually to do with pixels instead. If someone could just give me a pointer to a manual or just tell me whether it's datagrid - cells, rows, pixels, or bananas that would be great :-)

                > Even assuming you really wanted 5000 columns, there is no reason to specify a rowCount that high.

                Again I wouldn't be so sure. If the data is normally rendered as a graph/chart but you wish to allow the user to drill-down into the detail lines then "Why not?".

                > Such a grid would be unusable, as it would take a horrendous amount of time to render. An hour?

                Actually, at least in JavaScript/html-DOM (Haven't tried it with Flex yet), the performance is very good! The only problem being the tearing down of the large Array before the next query. (Which was solved by cloning a blank <select-list> and replaceChild rather than trying to re-initialize the options collection)

                > There is no practical limit to the number of rows you can display.

                That's what I wanted to hear!

                > Of course the user would have to wait for the data to get to flex,
                > which would depend on the bandwidth and the total payload,

                What I've done in the past is retrieve the rows from the server and display them as they arrive into the select-list while a row-counter is clicking over in real-time for the user to see. During this time the user is empowered by a hot-abort button that would let them terminate the query at any point should they, and only they, decide they've had enough, or they need to modify their selection criteria. (Parallelism betwwen the server retrieving and the client presenting the data.)

                I should point out here that I'm not using a HTTP/XML server but rather one that is accessed by Java Sockets. (I'd like to use Flex's TCP/IP Sockets but they don't surface connect timeout, or the sending of OOB functionality, so I'll stick with Java for the mo. (UDP would be useful too.))

                > You would use a paged methodology to access the data the user actually needs,
                > rather than get 10000 records.

                No I wouldn't. At least for this case (and I suspect the majority of others) "paging" is confined to the annals of history.

                > so the answer to your question is that you could probably hit this limit if you tried,
                > as an academic exercise, but it will never affect you in a real world scenario.

                So the good news is there is no limit other than that imposed by the OS and available memory? Sounds great! If someone could just confirm that, or at least tell me what the 5K by 5K limit was, I'd be very grateful.

                Cheers Richard