> BTW, according to my personal experience flash player unable to handle
more that 10K records in data grid.
> Just physically unable - out of memory error!

I have no problem populating a DataGrid with one million records. The
following program takes 519 MB when I run it on my Windows machine,
which has 2 GB of RAM. With no records it takes 73 MB, so each record
requires about 450 bytes of memory for the 6 String fields.
 
- Gordon
 
?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
    initialize="initializeHandler(event)">
 
 <mx:Script>
 <![CDATA[
   
  import Person;
  
  private function initializeHandler(event:Event):void
  {
   const N:int = 1000000;
   
   var a:Array = new Array(N);
   for (var i:int = 0; i < N; i++)
   {
    var p:Person = new Person();
    p.firstName = "FirstName" + i;
    p.lastName = "LirstName" + i;
    p.address = "Address" + i;
    p.city = "City" + i;
    p.state = "State" + i;
    p.zip = "Zip" + i;
    a[i] = p;
   }
   
   dg.dataProvider = a;
  }
 
 ]]>
 </mx:Script>
 
 <mx:DataGrid id="dg">
  <mx:columns>
   <mx:DataGridColumn dataField="firstName"/>
   <mx:DataGridColumn dataField="lastName"/>
   <mx:DataGridColumn dataField="address"/>
   <mx:DataGridColumn dataField="city"/>
   <mx:DataGridColumn dataField="state"/>
   <mx:DataGridColumn dataField="zip"/>
  </mx:columns>
 </mx:DataGrid>
 
</mx:Application>

-----
 
Person.as:
 
package
{
 
public class Person
{
 public function Person()
 {
  super();
 }
 
 public var firstName:String;
 public var lastName:String;
 public var address:String;
 public var city:String;
 public var state:String;
 public var zip:String;
}
 
}


________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lytvynyuk
Sent: Friday, November 09, 2007 12:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex grid to serve 100K-1mil rows



BTW, according to my personal experience flash player unable to handle
more that 10K records in data grid. Just physically unable - out of
memory error!

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "letterpigeon" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> 
> We've built a flex grid that supports mass action on its data right
> now (column-wise search & replace). But it just doesn't scale right
> now. It can hold up to around 3K+ rows in the grid, but it's taking a
> good few mins to load that up from the java backend servlet. The
> requirement is for the grid to be able to support up to 100K+ or even
> 1 million rows (may be not displaying them all at once, but when the
> mass action/search is taken, it should be performed on the complete
> dataset, not just what is being served up on the grid).
> 
> We're just looking for ideas how this could be achieved, i.e.: if
> pagination is needed, what is the best way to do? client side
> pagination v.s. server? Could this be a good use case for Flex Data
> Service? etc.
> 
> Any pointers/ideas/experience would be greatly appreicated. Thanks in
> advance.
> 
> Regards,
> Ban
>



 

Reply via email to