Re-loading a store takes forever///
When loading a store of about 400 records this code gets executed in the blink of an eye:
Code:
// initially load the store
var contactTypesStore = Ext.create('AtmGo.store.ContactTypes');
Ext.Object.each(responseJSON.rx.contact_types, function(key, value) {
contactTypesStore.add(Ext.create('AtmGo.model.ContactTypes', value));
});
contactTypesStore.sync();
later, after adding a record and getting new data to replace the store, this code takes about 15 secs, long enough to be annoying, and I imagine it will get longer with a larger number of records:
Code:
// update the store
backingStore.removeAll();
Ext.Object.each(responseJSON.rx.contact_types, function(key, value) {
backingStore.add(Ext.create('AtmGo.model.ContactTypes', value));
});
backingStore.sync();
Any ideas as to why this takes so long, and how I can fix it?