-
13 Mar 2012 7:48 AM #1
Performance & suggested best practice on how ensure 'override' is loaded
Performance & suggested best practice on how ensure 'override' is loaded
Must admit I do like the latest change in regards to the designer using 'Override' functionality as opposed to base and extension classes.
Essentially generating source files when they are actually needed is much cleaner and helps to avoid code bloat (partly). That is as opposed to always generating a base and extended class even though half the time the extension was not necessary.
A few questions though:
1. Is the override method of loading & executing classes faster, slower or the same in terms of application performance?
2. What is the best practice/suggested place to wire in the override class. Ensuring it is referenced and loaded?
Both in a full MVC application and a a basic non-mvc view.
-
13 Mar 2012 10:56 AM #2
In general, it will be faster as you are not loading as many files and not created as many classes.
In MVC, it is by a requires statement (which we automatically generate) in the Application launch code. We are aware of a bug in Ext 4.0.x's MVC package which will fire the launch method before requires are finished loading. In certain cases this will cause an issue with this approach.
For a non-mvc view, you'd have to require the override from whereever you were using the view.Aaron Conran
@aconran
Sencha Architect Development Team
-
14 Mar 2012 2:25 AM #3
-
14 Mar 2012 7:59 AM #4


Reply With Quote