1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    London, UK
    Posts
    32
    Vote Rating
    1
    markofsine is on a distinguished road

      0  

    Default 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.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by markofsine View Post
    1. Is the override method of loading & executing classes faster, slower or the same in terms of application performance?
    In general, it will be faster as you are not loading as many files and not created as many classes.

    Quote Originally Posted by markofsine View Post
    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.
    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

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    London, UK
    Posts
    32
    Vote Rating
    1
    markofsine is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    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.

    Loading files:
    Once the project is 'built' into a single .js release file is this still relevant?

    Create classes:
    So does the override essentially create a new class, or just inject/overwrite the original classes prototype?

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by markofsine View Post
    Loading files:
    Once the project is 'built' into a single .js release file is this still relevant?
    No, but you are still defining less classes.

    Quote Originally Posted by markofsine View Post
    Create classes:
    So does the override essentially create a new class, or just inject/overwrite the original classes prototype?
    Inject/override
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar