Though the thread, suggets to use suspendEvents and resumeEvent, but doesnt brought any significant performance improvements. As an alternate solution, I used store.data.add() instead of store.add() which gave incredible performance. But, there was some hidden issues in using store.data.add() and as follows:
I have an editoregridpanel. I duplicated some existing records into the grid, using store.data.add(). Now, if I click on the editable cell of the newly copied record and type-in some values, then on the onblur of that particular cell, the value get restored to its previous value (ie, value before editing). If I click again on the editable-cell, then in the edit-mode of that cell, I can see my original typed-in value and again on the onBlur, it restores its original value.
To solve this, on cell's afterEdit event, I refreshed the gridview, which solves the above mentioned problem.
So I conclude that on using store.data.add() method, I'm missing to re-register some events, which is causing the cell's updation problem.
Here comes my doubt:
1. What is the difference between store.add and store.data.add?
2. store.data.add() has a significant performance over store.add(). Why?
3. Is store.data.add() can be used? If so, what all events I need to re-register and what all events I need to bother about? Do I need to regiter the events for grid, store AND columnmodel?
4. Why the cell does not detain value when I added records using store.data.add()?
These are all my finding and concerns.
Is there any better way to add bulk records into the store without any drop-in-performance?
Any help will be appreciated.
Looking forward for valuable responses.