Skip to main content

ExtJS Grid Large Datasets Handling

Efficiency of ExtJS data stores and large data sets

I'm curious what experiences other developers have seen when loading large data sets into ExtJS stores. I think there are a few basic ways to look at what a large data set is:
Few records with many properties.
Many records with few properties.
Many records with many properties.

For large datasets there are too handle it, infinite grid and buffered rendering grid. The main difference is the infinite grid sends requests to load data on the fly where buffered rendering grid retrieves all the data in one go and the grid will only display a portion of that dataset based on the size of the grid. 

http://docs.sencha.com/extjs/4.2.1/#!/example/grid/infinite-scroll.html 
http://docs.sencha.com/extjs/4.2.1/#!/example/grid/buffer-grid.html 

If the slowdown is the store loading all that data then I would suggest going with an infinite grid. If the slowdown is the grid rendering all that data then I would go with the buffered grid.


Loading data in a Ext store consists of:

1. Recieving the data and evaluating the response.
- Always use JSON. XML is a lot slower.
- Use arrays, short property names and constants as much as possible to reduce the data (string) size.

2. Transforming the data to records.
- Avoid conversion (e.g. string->date). Make your server return data that doesn't need conversion (e.g. return Date instances).
- If your server already returns an array of objects with the correct fieldnames, then you can override extractValues to simply return the raw data.

3. Adding the records to the store (indexing the id).
- Not much you can do about this...

4. Update any listening components.
- This is by far the slowest: Avoid showing large datasets.
- If you have to, use filtering, paging or a view that doesn't render the entire dataset.

IE8 Issue with large dataset:
If we have 50 records that loads 1MB of data? That's why a lot of data and I'm not surprised IE is having issues with 1MB of data.


Real time issue:
After grouping feature is applied on grid, Row expander plug-in is not working if we use EXT Store property (remoteSort: true) 

Comments

Popular posts from this blog

Ext4 Apply Store Filtering

In extjs4.1: There are many way for store filtering . Some of code i give here Filtering by single field: store . filter ( 'eyeColor' , 'Brown' );   Alternatively, if filters are configured with an  id , then existing filters store may be  replaced by new filters having the same  id . Filtering by single field: store . filter ( "email" , /\.com$/ );   Using multiple filters: store . filter ([ { property : "email" , value : /\.com$/ }, { filterFn : function ( item ) { return item . get ( "age" ) > 10 ; }} ]);   Using  Ext.util.Filter  instances instead of config objects (note that we need to specify the root config option in this case): store . filter ([ Ext . create ( ' Ext.util.Filter ' , {   property : "email" , value : /\.com$/ , root : 'data' }),   Ext . create ( ' Ext.util.Filter ' , {   filterFn : function ( item ) {   return item . get ( &

ExtJS - Grid panel features

What can we do with ExtJS GridPanel? I have to develop a lot of applications in my web app and I see that grid component of ExtJS may fit in. However, I am not aware of what all things I can do with the - off the shelf available framework pieces - available plug-ins in the marketplace and - custom development through my own developers This is a typical question that we hear from the business users who wants to design an application by keeping the framework’s capability in perspective. In this article I have tried to put the list of stuff you can do with grid and hopefully that shall enable you to take advantage of the beauty of ExtJS. Pre-requisites This article assumes that you are familiar with basics of ExtJS What are the available options? In this section I will be taking you through some of the commonly seen usage of ExtJS grid panel. While covering all the capabilities of grid may not be possible, I am sure it will be helpful for the business users who want to

EXTJS - Way to get a reference to the viewport from any controller

An easy way to get a reference to the viewport from any controller Here's an easy way to get a reference to your viewport from any controller: Ext.application({ launch: function(){ this.viewport = Ext.ComponentQuery.query('viewport')[0]; this.centerRegion = this.viewport.down('[region=center]'); } }); then, inside say, a controller, you can call this: this.application.viewport to get a reference to the viewport.