Skip to main content
Products & Tools

Vercel Flags SDK Improves Cold Start Performance

Vercel Flags SDK now initializes 7x faster during cold starts and reduces flag-read latency to under 1 ms.

By Precis Daily Newsroom1 min read171 words
AI-summarized from the linked source and published automatically — not human-edited.How this works →

What happened

Vercel has updated its Flags SDK to enhance performance during cold starts. The SDK now initializes more quickly, reducing the time needed for the first invocation of a function.

The SDK now loads and parses the flags datafile as soon as the client is created, preparing it before the code evaluates any flags. This change ensures that the SDK is ready for use before any flag checks are performed.

Why it matters

Cold starts can slow down the initial response time of serverless functions. By improving the initialization process, Vercel aims to make applications more responsive, especially for users experiencing the first request.

Key details

After initialization, reading flags is nearly instant, with p99 flag-read latency under 1 ms across both cold and warm invocations. This improvement ensures consistent performance regardless of the function state.

The SDK no longer uses waitUntil for usage reporting, which previously caused functions to remain active after the response was sent. This change ensures that reporting does not extend function duration.

Sources

Summarized from the linked originals.

Related stories