PDA

View Full Version : Problems updating records at grid panel



extjs_aja
23 Apr 2013, 3:23 AM
Hello @all,

Ive got some performance problems to update some records in a grid panel. The update of records is very fast, but to commit the changes to store, it takes over 25 seconds for 14 records.

Ive tried it with resume and suspend events, but the store does not getting updated, if store.commitChanges() is executedd before store.resumeEvents().

Have anybody an idea to get this function faster?
Need some help!!!



deviceHorizontalStore.suspendEvents();
var devRecToChange = [ ];


deviceHorizontalStore.each(function(rec){

if(rec.getData().label=='Plan'){
devRecToChange.push(rec);
}
else if(rec.getData().label=='Plan Cumulated'){
devRecToChange.push(rec);
}

});

for(d = 0; d < devRecToChange.length; d++){
rec = devRecToChange[d];
console.log('Record ' + d + ":" + ((new Date().getTime() - float_ts)/1000) + ' Sek.');
for(dev = 0; dev < 96; dev++){
rec.set('v'+dev, '');
}

}

deviceHorizontalStore.resumeEvents();

console.log('Zeit (before commitChanges): '+ ((new Date().getTime() - float_ts)/1000) + ' Sek.');
deviceHorizontalStore.commitChanges(); //duration 25 sec
console.log('Zeit (after commitChanges): '+ ((new Date().getTime() - float_ts)/1000) + ' Sek.');



The attached images shows the times of execution at the console.

43309

slemmon
24 Apr 2013, 2:56 PM
Can you post a brief test case to demonstrate the issue?
Also, what version of Ext are you seeing the issue? Browser and browser version?