#31 new

Ineffective code in S2.UI.Mixin.Configurable#setOptions()

Reported by Victor | November 19th, 2011 @ 02:37 PM

Instead of reversing array in S2.UI.Mixin.Configurable#setOptions()

        chain = chain.reverse();

        for (var i = 0, l = chain.length; i < l; i++)
          Object.deepExtend(this.options, chain[i].DEFAULT_OPTIONS || {});

simple loop in reverse direction will be faster, e.g. just

        var i = chain.length;
        while (i--) 
          Object.deepExtend(this.options, chain[i].DEFAULT_OPTIONS || {});

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป


People watching this ticket