#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

  • rafalwrzeszcz

    rafalwrzeszcz November 29th, 2011 @ 02:46 PM

    Got just one question - is anyone still working on Scripty2? I have posted some pull requests on GitHub, there are also some other tockets on lighthouse. I see completly no progress, reactions, nor feedback :(.

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