> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# array-shift-in-fifo-drain

> A FIFO drain repeatedly removes the first array element.

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.