Closed tplaindoux closed 9 years ago
that's just a minor optimization, but Acl will use a lot the indexOfquery to determinate whether an user can or cannot access a page/ do something.
indexOf
Mind changing the loop to increase a bit the performance ? http://jsperf.com/fastest-array-loops-in-javascript/295
I'd recommand:
var l = arr.length; for(;l--;) { someFn(arr[l]); } postLoop();
that's just a minor optimization, but Acl will use a lot the
indexOf
query to determinate whether an user can or cannot access a page/ do something.Mind changing the loop to increase a bit the performance ? http://jsperf.com/fastest-array-loops-in-javascript/295
I'd recommand: