PDA

View Full Version : low grid performance in IE8



aj3423
5 Aug 2010, 7:06 PM
it's fine with firefox, but in IE8, try a grid with 1000rows*10columns, click the header menu trigger, the menu displays after 2 seconds, the contextMenu, even the browser's context menu takes 2 seconds to display. why it takes so long ?

aj3423
5 Aug 2010, 7:29 PM
see the code below

aj3423
5 Aug 2010, 10:11 PM
try this code

var rowCount = 1000;
var colCount = 10;

Ext.onReady(function() {
data = [];
for(i=0; i< rowCount; i++) {
var a = [];
for(j=0; j<colCount; j++) {
a.push('cell '+i+', '+ j);
}
data.push(a);
}

fields = [];
cm = [];
for(i=0; i<colCount; i++) {
fields.push('c'+i);
cm.push({
dataIndex: 'c'+i,
header: 'c'+i
});
}
store = new Ext.data.ArrayStore({
data: data,
fields: fields
});

cm = new Ext.grid.ColumnModel(cm);
grid = new Ext.grid.GridPanel({
store: store,
cm: cm
});


win = new Ext.Window({
width: 800,
height: 400,
items: [grid],
layout: 'fit'
}).show();
win.setTitle(store.getCount() + ' records');
});