Results 1 to 6 of 6

Thread: Delegate Ext.Object.chain to Object.create

Threaded View

Previous Post Previous Post   Next Post Next Post
    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
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,887
    Vote Rating
    541
      0  

    Default 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •