View Full Version : Load controller dynamically- Performance issue

2 Jan 2014, 5:52 AM
I am suing below code to load controller dynamically so that related files will be loaded on demand only.

controller = Ext.create(DRIVER_CONTROLLER_PACKAGE, {
application: APPLICATION_ROOT,

But the performance of above statement is not good enough to load the screen faster. Do you have any suggestion for this issue?

2 Jan 2014, 10:32 AM
Where are you performing this? The controller should only handle the actions, why should it affect your screen load?
What is happening on init, and how many lines of code is in this controller that it would cause such a noticeable delay?

2 Jan 2014, 8:57 PM
Hi Scott,
Thanks for your response.
We have many screens in our application(with different views, models, stores). We did not want to load all the files on initial page load. So, we were trying to do lazy initialization of the controller, so that the controller(and hence related views/models/stores) will be loaded on demand only. I believe loading of the views/model/store js files on creating the controller is affecting the performance.
Could you please tell me if there is a solution to this issue?