1. #1
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,167
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default JavaScript Performance tips and Tricks with Our own Grgur Grisogono

    JavaScript Performance tips and Tricks with Our own Grgur Grisogono


    Filmed at our NoVa JS meetup on 10/2/2012, Grgur Grisogono discusses JavaScript Performance tips.

    Enjoy
    http://moduscreate.com/javascript-pe...ce-tips-video/

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    7,185
    Vote Rating
    194
    scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold

      0  

    Default


    No go ... there must be a lot of people watching it .. look forward seeing this.

    Scott.

  3. #3
    Sencha Premium Member Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Delaware
    Posts
    494
    Vote Rating
    48
    Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about

      0  

    Default


    I always find it interesting to see performance comparisons like this. It is very useful when needed, but unfortunately many people seem to take this type of thing and throw away all the other methods available to them deemed slower. Readability/maintainability should always be preferred over performance unless performance actually needs to be addressed. I was recently called out for using Ext.Array.each instead of a for loop for an array of 16 items. I also recently saw a post saying you shouldn't use MVC or Ext.create and many other parts of Ext because they do not perform well enough. By the same logic, we should all program in assembly because higher level languages may not always be optimal.

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,167
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    No go ... there must be a lot of people watching it .. look forward seeing this.

    Scott.
    Thanks dude. I changed the URL and forgot to update this post.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  5. #5
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,167
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    Quote Originally Posted by Tim Toady View Post
    I always find it interesting to see performance comparisons like this. It is very useful when needed, but unfortunately many people seem to take this type of thing and throw away all the other methods available to them deemed slower. Readability/maintainability should always be preferred over performance unless performance actually needs to be addressed. I was recently called out for using Ext.Array.each instead of a for loop for an array of 16 items. I also recently saw a post saying you shouldn't use MVC or Ext.create and many other parts of Ext because they are not performant. By the same logic, we should all program in assembly because higher level languages may not always be optimal.

    The purpose of these types of discussions are to know when to use the more "performant" (not really a word) way of doing things in JavaScript. I agree with you 110% about readability, which is why i tend to space things out and write code in "blocks".

    Code:
    Ext.define('App.view.ContactDetails', {
        extend : 'Ext.form.Panel',
        xtype  : 'contactdetails',
    
        requires : [
            'Ext.form.FieldSet'
        ],
    
        config : {
            items : {
                xtype : 'fieldset',
                title : 'Contact details',
    
                defaults : {
                    xtype          : 'textfield',
                    labelWidth     : '30%',
                    autoCapitalize : true
                },
    
                items : [
                    {
                        name  : 'firstname',
                        label : 'First'
                    },
                    {
                        name  : 'lastname',
                        label : 'Last'
                    },
                    {
                        name  : 'phone',
                        label : 'Phone'
                    }
                ]
            }
        }
    });

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  6. #6
    Sencha Premium Member Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Delaware
    Posts
    494
    Vote Rating
    48
    Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about Tim Toady has a spectacular aura about

      0  

    Default


    To my defense, it is often used in similar discussions, but you are correct and I went ahead and changed my wording. I do think performance is a useful and interesting topic. My purpose was only to say some people misapply this type of information.