-
19 Jun 2012 4:49 AM #1
create and destory grid and store.load to fill will get slower at each iteration
create and destory grid and store.load to fill will get slower at each iteration
I am creating a tab with a panel and a grid inside it. It gets filled from the DB. The first time, its very fast, about 2 seconds. now each time I destroy the grid, remove the tab and than recreate the tab with the same grid, same data, the system slows down adding about 1 second. Using the profiler I can see that the number of calls within EXTJS increases by about 40000 ! on each create. The data are displayed within a second but the loading mask will not go for a while. This is the same behaviour in 4.1.0 and 4.1.1. Is that a known problem ?
According to the profiler, its the following piece of code that gets called thousands of times:
isModified : function( fieldName) {
return this.modified.hasOwnProperty( fieldName);
}
-
19 Jun 2012 6:46 AM #2
This should not be happening .. if you have autoDestroy set to the default true, this should be handled automatically.
Scott
-
19 Jun 2012 8:05 AM #3
I have not changed any of the defaults, below a few lines of code if that helps:
......
.....Code:var overviewGrid = new Ext.grid.GridPanel ({ id : 'overviewGrid' + id, autoHeight : false, autoWidth : true, columns : overviewColumnModel, store : tomcatOverviewStore, loadMask : true, features : [filters], autoExpandColumn : 'managedBy' }); tomcatOverviewStore.load(); tabs.add({ title : recName , id : id, closable : true, border : false, iconCls : 'icon-' + recKey, items : overviewGrid, autoScroll : true }).show(); Ext.getCmp( id ).on( 'close', function() { releaseToolbar(); // Just deactivate some menu items });
I could provide you with more details if you let me know what is useful to you


Reply With Quote