# bunqueue v2.6.63

Ships 2 performance improvements. WorkerRateLimiter: O(n) → O(1) amortized: Replaced Array.filter() with head-pointer eviction for sliding window token expiration.

Canonical: https://bunqueue.dev/blog/bunqueue-v2-6-63/

---

<!-- Generated from changelog.md by docs/scripts/generate-release-posts.ts. Edit the changelog and regenerate. -->

Ships 2 performance improvements. WorkerRateLimiter: O(n) → O(1) amortized: Replaced Array.filter() with head-pointer eviction for sliding window token expiration.

#### To install bunqueue v2.6.63

```bash title="bun"
bun add bunqueue@2.6.63
```

```bash title="npm"
npm install bunqueue@2.6.63
```

#### To upgrade bunqueue

```bash
bun add bunqueue@latest
```

## Performance

- **WorkerRateLimiter: O(n) → O(1) amortized**: Replaced `Array.filter()` with head-pointer eviction for sliding window token expiration. Eliminates per-poll array allocation and removes `Math.min(...spread)` (potential stack overflow on large token arrays). Benchmarked: 10k tokens went from 31µs to ~0µs per call; zero memory allocation per poll cycle.
- **FlowProducer: parallel sibling creation in TCP mode**: `add()`, `addBulk()`, `addBulkThen()`, and `addTree()` now create independent children/jobs concurrently via `Promise.all`. TCP benchmark shows **3–6x speedup** for flows with 10–20 children (network round-trips overlap instead of serializing). `addBulkThen()` uses `Promise.allSettled` for proper cleanup on partial failure. No impact in embedded mode (pushes are synchronous). `addChain()` unchanged (sequential by design).

---

[← bunqueue v2.6.62](https://bunqueue.dev/blog/bunqueue-v2-6-62/) · [Full changelog](https://bunqueue.dev/changelog/) · [All posts](https://bunqueue.dev/blog/)
