Threaded View

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6250 in a recent build.
  1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,299
    Vote Rating
    109
    LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light LesJ is a glorious beacon of light

      0  

    Default Delegate Ext.Object.chain to Object.create

    Delegate Ext.Object.chain to Object.create


    This is a performance improvement suggestion.

    Ext.Object.chain could be delegated (on supported platforms) to Object.create. This would improve performance.

    Object.create
    Ext.Object.chain

    Try this test. You will see that Object.create is at least 50% faster.

    EDIT
    Also, see this similar delegation Ext.Object.getKeys --> Object.keys


    Code:
    var obj = {
        key1: 'xxx',
        key2: 'yyy',
        key3: 'zzz',
        key4: 'www',
        key5: 'aaa'    
    }
    
    console.time('chain');
    for (var i=0; i<10000; i++) {
        Ext.Object.chain(obj);
    }
    console.timeEnd('chain');
    
    console.time('create');
    for (var i=0; i<10000; i++) {
        Object.create(obj);
    }
    console.timeEnd('create');
    *** EDIT 5/18/12
    See how the Compose library checks if Object.create is available.
    Last edited by LesJ; 18 May 2012 at 5:49 AM. Reason: Add Compose link

Thread Participants: 1