bunqueue v2.6.63
blog · release
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.
To install bunqueue v2.6.63
Section titled “To install bunqueue v2.6.63”bun add bunqueue@2.6.63npm install bunqueue@2.6.63To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestPerformance
Section titled “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 removesMath.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(), andaddTree()now create independent children/jobs concurrently viaPromise.all. TCP benchmark shows 3–6x speedup for flows with 10–20 children (network round-trips overlap instead of serializing).addBulkThen()usesPromise.allSettledfor proper cleanup on partial failure. No impact in embedded mode (pushes are synchronous).addChain()unchanged (sequential by design).