3

I am working on a grid that users may load xml file and do editing via grid panel. It works well with around 200 rows. However some users may want to load 50000 records at a time.

When I try to load a file with 10k records, firefox crashes and chrome waits too much. After some debugging I realized that rendering the data to panel requires too much time. for every new row I need to refresh the grid which requires too much time again.

One important point is, the xml file never comes to the serverside, we read it with extjs and load to the grid.

Is is possible to load whole data to store but request a certain amount of data to render the panel view?

I tried inifinite grid but cannot make it work since my data source is a string. What do you offer to manage 50k data.

tkcn
  • 516
  • 3
  • 10
  • 29

1 Answers1

1

I've had a similar issue with ExtJS in the past while trying to load very large grids. Let me just say at the outset that it's certainly not their fault - 50,000+ records is just way too much data. To get around this problem I resorted to using paging.

Have a look at their documentation for a paging toolbar.

Here is an example.

My only other suggestion would be to use an infinite grid, but write a file conversion wrapper over your XML data to convert it to JSON.

Steven
  • 1,564
  • 1
  • 22
  • 34
  • 2
    Exactly, you'll need to use some sort of backend technology to parse your xml and send fragments (pagination) to your front end. Your memory is going to blow if u display 50k records in your grid. – Johan Haest Apr 01 '13 at 08:20
  • I added paging, it remarkably affected the performance. However now I have another problem that updating pagingtoolbar after filtering the store . – tkcn Apr 03 '13 at 08:23
  • All the paging toolbar really does is control the parameters that are sent to the server when requesting data (`start` and `limit`). It is up to your server technology to parse these parameters, and use their values to retrieve the required data. I typically use .NET and WCF web services to perform my data extraction. WCF provides object serialization to JSON, and it is easy to set up for HTTP requests. [Here is a WCF example](http://stackoverflow.com/questions/2086666/wcf-how-do-i-return-clean-json). When filtering you also need to send the filter values in your request. – Steven Apr 03 '13 at 22:05