ecoCode-javascript icon indicating copy to clipboard operation
ecoCode-javascript copied to clipboard

Add rule "Getting the size of the collection in the loop"

Open mathis-girault opened this issue 8 months ago • 1 comments

Solution you'd like

When iterating over any collection, fetch the size of the collection in advance to avoid fetching it on each iteration, this saves CPU cycles, and therefore consumes less power.

Is your feature request related to a problem?

No response

Alternatives you've considered

No response

Additional Information

No response

mathis-girault avatar May 20 '25 12:05 mathis-girault

The LESS team will implement this rule

mathis-girault avatar May 20 '25 12:05 mathis-girault