1. #11
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,704
    Vote Rating
    495
    LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future

      0  

    Default

    The cleaner and nicer the program, the faster it's going to run. And if it doesn't, it'll be easy to make it fast.

    - Joshua Bloch (Google)

  2. #12
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,704
    Vote Rating
    495
    LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future

      0  

    Default

    Quote Originally Posted by evant View Post
    Ideally, yes. Practically, not quite there yet! http://triin.net/2011/03/02/Optimizi...h:_Not_so_fast!
    There must be a way to do this sort of conversion. CoffeeScript converts their loops into traditional JavaScript loops, see this.

  3. #13
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    18
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default

    Quote Originally Posted by LesJ View Post
    There must be a way to do this sort of conversion. CoffeeScript converts their loops into traditional JavaScript loops, see this.
    I'm just getting into CoffeeScript, having implemented it in SilkJS.

    It seems like a lot of work to wrap ExtJS with CoffeeScript, but it could be interesting in the end. If you're just using client-side, though, it adds another build step and I think it might be difficult to debug generated JavaScript in the browser...

  4. #14
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,704
    Vote Rating
    495
    LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future

      0  

    Default

    Quote Originally Posted by LesJ View Post
    I found an Ext.each that should be converted to a plain for loop.

    Code:
    Ext.define('Ext.util.AbstractMixedCollection', {
        ...
        removeAll : function(items){
            Ext.each(items || [], function(item) {
                this.remove(item);
            }, this);
    
            return this;
        },
        ...
    Fixed in nightly:

    Code:
        removeAll : function(items) {
            items = [].concat(items);
            var i, iLen = items.length;
            for (i = 0; i < iLen; i++) {
                this.remove(items[i]);
            }
    
            return this;
        }

  5. #15
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,602
    Vote Rating
    1140
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    There are quite a lot of function iteration fixes we have in. Not all of mine mad it in I don't think but quite a few.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.