1. #1
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      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/

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,873
    Vote Rating
    439
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


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

    Scott.

  3. #3
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    536
    Vote Rating
    70
    Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough

      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
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      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.

  5. #5
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      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'
                    }
                ]
            }
        }
    });

  6. #6
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    536
    Vote Rating
    70
    Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough

      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.

Thread Participants: 2