Ext.ux.AccordionList
Ext.ux.AccordionList copied to clipboard
Refreshing store takes too much time compared to initial loading of AccordionList
Hi @kawanoshinobu
I am facing issue refreshing the store. Let me describe the scenario first.
I am using AccordianList for a hybrid mobile application, in my case iPhone App, having Cordova as native plugin for database management.
In AccordianList, I have 200 list items each item having one leaf. I have used singleMode=true. Initial loading of the list takes around 4 seconds. When I refresh the list by calling removeAll() and then setStore(), it takes around 2.5 minutes to reload the list view for the same data.
Any insight or suggestion would be heartily appreciated.
Bharat
While list is getting reloaded, I keep getting following warning in my XCode's log:
void SendDelegateMessage(NSInvocation *): delegate (webView:resource:didFinishLoadingFromDataSource:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
Bharat
I have got the solution to the issue. store.removeAll() was causing delay in refreshing the store. It has been replaced with following steps:
store.suspendEvents(); store.removeAll(true); store.resumeEvents(true); store.load();
Now list gets refreshed in 6 seconds only.
Bharat
@bharatdodeja I have managed to solve the same issue with this code store = Ext.getStore('Contactsstore'); store.data.clear();
@bharatdodeja I have one question are you loading 200 records in a single request? Is there any delay by loading 200 records in a single request? my store have around 500 records when i try to load all 500 records in single request my app hangs. Let me know your suggestion about loading all records in a single request. Later i have implemented pagination to resolve the issue. But my indent is to load all records in a single request and store it in local storage. Thank you.