Hello ExtJS community,
I'm sure this has been answered countless times before, but since I couldn't find it whilst searching, I figured I'd ask it here.
Let me clarify, my app works just fine.
My question is more related to performance now.
As my application grows, more stores are added, etc... and I find the time it takes for the app to initiate takes longer.
To combat this, I decided to move to a MVC architecture and load my controllers and stores only when needed.
Now, when creating an instance of a controller, it loads all the associated stores (good) and they have autoload set to true. If autoload is not set to true, then when I open the form, the comboboxes don't populate with the necessary form data.
So I have to set autoload to true for all the relevant stores. The problem is... in a scenario where there are many remote comboboxes and stores (let's stay around 12 on one form), with lots of data pulled remotely from the database, this can really slow things down, due to the amount of data dynamically loaded and bound to the combo boxes.
My controller has two separate methods... one list() method which displays a grid view, and one view() method which opens a pop up window to show the data.
The view() method is where all the comboboxes are contained.
In the list() method, I have no need for the controller to autoload all the stores remotely.
I would like the stores to autoload only after I have called the view() method, opened the relevant window and loaded the model data.
One solution that comes to mind is to remove the autoload properties and for every combobox, call the store's load() method from the view() function.
I'd like to know what others have done in similar circumstances, what solutions you may have available and whether there's a better way than the approach I've taken.
Thanks in advance!