I have a simple grid without direct connection with any database table. Just days of mounth in raws and persons in columns (let's say 31 x 20). In init procedures I read data from some tables, calculate and write them to this grid. Then I have to calculate lot of indexes, make some summs by raws, columns and part of them. Just statistics.
There's no problem with read from grid cells, this is very quick. I have a problem with writing data to the cells. E.g. procedure to fill this grid is the following:
days = Ext.getStore('StoreDays').getRange();
employees = Ext.getStore('StoreTeam').getRange();
Ext.each(days, function (day) {
Ext.each(persons, function (guy) {
tmp = day.get('from');
day.set('start_' + persons.data.prs_numer, start);
... and 4 additional SET operations to grid cells
});
});
And this procedure work more then 3 minutes!!! I don't know why and how to write good code to write this data normally. Be so kind and prompt me HOW! Additionally I can't refresh e.g. every single raw after raw settings as I want. Would you be so kind as to prompt me?