You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue gathers all known performance issues that are NOT due to edge-cases.
If your workflow performs well in most cases, but hits performance problems in some cases, please open a separate issue, and optionally link it here.
Known bottlenecks
Replay invocation overhead
Between every step, the workflow enqueues an event replay. This means invocation overhead, queue overhead, and initial state fetching overhead on each step call.
Events come with user payloads, which the World backend may choose to resolve lazily, requiring further network roundtrips, usually when the user payload is large
Keeping your step inputs/outputs small is the best way to reduce network overhead here at this point in time
Using DurableAgent/WorkflowAgent will almost certainly result in large step inputs/outputs as the full conversation needs to be passed to/from the LLM. This can be reduced to some extent.
Consider turning off the collectUIChunks option if don't need it
Workflow "use workflow" and "use step" functions get bundled separately (< 5.0.0-beta.5) or as one bundle (>= 5.0.0-beta.5), each of which can incur cold starts separate from the API bundles that start the workflows.
On Vercel, using Fluid compute (highly recommended) will intelligently pre-warm your functions (and reduce costs)
Use >= 5.0.0-beta.5 to half the amount of bundles that need to be warm
Cross-region networking
Your app, workflow runtime, and DB should all run in the same network region.
As of May 5, 2026, workflows run against iad1 (us-east), so it's recommended to run your workflow-enabled app and the connected databases or other services in the same region. See #1931 for updates.
A note on pre-releases
Performance improvements go through a QA phase before being released as 5.x..x-beta releases currently. If you want the latest improvements now, considering using pre-releases (nightly build) by installing tarballs from https://workflow-tarballs.labs.vercel.dev/
This issue gathers all known performance issues that are NOT due to edge-cases.
If your workflow performs well in most cases, but hits performance problems in some cases, please open a separate issue, and optionally link it here.
Known bottlenecks
Replay invocation overhead
Between every step, the workflow enqueues an event replay. This means invocation overhead, queue overhead, and initial state fetching overhead on each step call.
>=5.0.0-beta.5removes 90%+ of this overhead ([core] Combine flow+step bundle and process steps eagerly #1338), but still spawns new invocation for:await Promise.allcalls)Replay event fetching overhead
>=5.0.0-beta.5ensures only new events are fetched in many cases, instead of re-fetching all eventscollectUIChunksoption if don't need itCold starts
Workflow "use workflow" and "use step" functions get bundled separately (<
5.0.0-beta.5) or as one bundle (>=5.0.0-beta.5), each of which can incur cold starts separate from the API bundles that start the workflows.The best ways to reduce this overhead are:
sourcemapoption in builders #1842)>= 5.0.0-beta.5to half the amount of bundles that need to be warmCross-region networking
Your app, workflow runtime, and DB should all run in the same network region.
As of May 5, 2026, workflows run against
iad1(us-east), so it's recommended to run your workflow-enabled app and the connected databases or other services in the same region. See #1931 for updates.A note on pre-releases
Performance improvements go through a QA phase before being released as
5.x..x-betareleases currently. If you want the latest improvements now, considering using pre-releases (nightly build) by installing tarballs from https://workflow-tarballs.labs.vercel.dev/