Skip to main content

What it flags

A while loop calls shift() on the array whose length controls the loop. Moving the remaining indexed elements after each front removal can be expensive for large arrays. The finding appears with --include-contextual.

How to review or fix

Measure representative queue sizes in your runtime. An alternate queue or head index can change what aliases observe and how long removed values stay reachable.