Vercel Cost Performance Stability

Unbounded collection response without pagination or streaming

Part of the Caching & cost check · fix arrives as a guide

What it is

An API route returns a full collection with no pagination and no streaming.

Why it matters

Response size grows with the data, so bandwidth cost, function duration, and memory all rise together. It degrades gradually and then fails at once when the response no longer fits the function's memory.

How to fix it

Add pagination with a default page size and return a cursor. For genuinely large exports, stream the response rather than assembling it in memory.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.