Skip to content

[ai] Reduce doStreamStep step boundary payload#1932

Draft
VaguelySerious wants to merge 2 commits intomainfrom
peter/issue-1929-reduce-stream-step-payload
Draft

[ai] Reduce doStreamStep step boundary payload#1932
VaguelySerious wants to merge 2 commits intomainfrom
peter/issue-1929-reduce-stream-step-payload

Conversation

@VaguelySerious
Copy link
Copy Markdown
Member

Summary

  • Move chunksToStep out of the doStreamStep step boundary. The step now returns minimal raw aggregates (text, reasoning, files, sources, warnings, responseMetadata, rawFinishReason, usage, providerMetadata); the full StepResult is reconstructed in streamTextIterator (workflow context) via buildStepResult.
  • Drop the separate finish field from the return — every field it carried was already on the reconstructed StepResult.
  • The user-facing StepResult exposed via onStepFinish and result.steps[] is unchanged. The reduction is purely in the durable execution event log.

What's no longer crossing the boundary:

  • StepResult's redundant tool-call lists (dynamicToolCalls, staticToolCalls, staticToolResults, dynamicToolResults)
  • Always-empty toolResults and response.messages
  • Duplicate content and reasoningText aggregates
  • Dual base64 + Uint8Array file encoding (expanded only after the boundary)
  • request.body (a JSON dump of the input prompt the caller already has)
  • finish (its finishReason, usage, providerMetadata already on step)

Internally, the V3 chunks[] array inside the step is also gone — fields are aggregated directly during the streaming transform.

Closes #1929.

Test plan

  • pnpm --filter @workflow/ai test — 187 passing, including updated mocks for do-stream-step.test.ts and stream-text-iterator.test.ts
  • pnpm --filter @workflow/ai build — clean tsc
  • CI green
  • Spot-check with workbench example (manual; not done locally — UI behavior should be unchanged since the user-facing StepResult shape is identical)

🤖 Generated with Claude Code

Move chunksToStep out of the step boundary, returning minimal raw
aggregates (text, reasoning, files, sources, warnings, response
metadata, finishReason, usage, providerMetadata) and reconstructing
the full StepResult in streamTextIterator (workflow context). Also
drops the separate `finish` field from the return — its data was
fully duplicated by the StepResult fields the caller already needed.

The user-facing StepResult exposed via `onStepFinish` and `steps[]`
is unchanged. The event-log payload no longer carries:

- StepResult's redundant tool-call lists (`dynamicToolCalls`,
  `staticToolCalls`, `staticToolResults`, `dynamicToolResults`)
- The always-empty `toolResults` and `response.messages` arrays
- The duplicate `content` and `reasoningText` aggregates
- The dual base64 + Uint8Array file encoding (now expanded only
  after crossing the boundary)
- `request.body` (a JSON dump of the input prompt the caller already
  has) and `finish` (its fields all appear on `step`)

Closes #1929.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment May 9, 2026 5:04am
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 9, 2026 5:04am
example-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-astro-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-express-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-fastify-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-hono-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-nitro-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-nuxt-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-sveltekit-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-tanstack-start-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workbench-vite-workflow Ready Ready Preview, Comment May 9, 2026 5:04am
workflow-docs Ready Ready Preview, Comment, Open in v0 May 9, 2026 5:04am
workflow-swc-playground Ready Ready Preview, Comment May 9, 2026 5:04am
workflow-tarballs Ready Ready Preview, Comment May 9, 2026 5:04am
workflow-web Ready Ready Preview, Comment May 9, 2026 5:04am

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: c8fdefa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@workflow/ai Patch
tarballs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 1195 5 219 1419
✅ 💻 Local Development 1587 0 219 1806
✅ 📦 Local Production 1587 0 219 1806
✅ 🐘 Local Postgres 1587 0 219 1806
✅ 🪟 Windows 129 0 0 129
✅ 📋 Other 727 0 176 903
Total 6812 5 1052 7869

❌ Failed Tests

▲ Vercel Production (5 failed)

fastify (1 failed):

hono (1 failed):

nextjs-turbopack (2 failed):

  • DurableAgent e2e provider tools provider tool identity preserved across step boundaries
  • stepWinsRaceWorkflow | wrun_01KR5KGV30CHSY9FXDM776HM6J | 🔍 observability

sveltekit (1 failed):

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 103 0 26
✅ example 103 0 26
✅ express 103 0 26
❌ fastify 102 1 26
❌ hono 102 1 26
❌ nextjs-turbopack 125 2 2
✅ nextjs-webpack 127 0 2
✅ nitro 103 0 26
✅ nuxt 103 0 26
❌ sveltekit 121 1 7
✅ vite 103 0 26
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 104 0 25
✅ express-stable 104 0 25
✅ fastify-stable 104 0 25
✅ hono-stable 104 0 25
✅ nextjs-turbopack-canary 110 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 129 0 0
✅ nextjs-webpack-canary 110 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 129 0 0
✅ nitro-stable 104 0 25
✅ nuxt-stable 104 0 25
✅ sveltekit-stable 123 0 6
✅ vite-stable 104 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 104 0 25
✅ express-stable 104 0 25
✅ fastify-stable 104 0 25
✅ hono-stable 104 0 25
✅ nextjs-turbopack-canary 110 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 129 0 0
✅ nextjs-webpack-canary 110 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 129 0 0
✅ nitro-stable 104 0 25
✅ nuxt-stable 104 0 25
✅ sveltekit-stable 123 0 6
✅ vite-stable 104 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 104 0 25
✅ express-stable 104 0 25
✅ fastify-stable 104 0 25
✅ hono-stable 104 0 25
✅ nextjs-turbopack-canary 110 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 129 0 0
✅ nextjs-webpack-canary 110 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 129 0 0
✅ nitro-stable 104 0 25
✅ nuxt-stable 104 0 25
✅ sveltekit-stable 123 0 6
✅ vite-stable 104 0 25
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 129 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 104 0 25
✅ e2e-local-dev-tanstack-start- 104 0 25
✅ e2e-local-postgres-nest-stable 104 0 25
✅ e2e-local-postgres-tanstack-start- 104 0 25
✅ e2e-local-prod-nest-stable 104 0 25
✅ e2e-local-prod-tanstack-start- 104 0 25
✅ e2e-vercel-prod-tanstack-start 103 0 26

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.033s (-26.2% 🟢) 1.006s (~) 0.973s 10 1.00x
💻 Local Nitro 0.033s (-23.0% 🟢) 1.005s (~) 0.972s 10 1.02x
🐘 Postgres Express 0.043s (-26.4% 🟢) 1.011s (~) 0.968s 10 1.31x
💻 Local Next.js (Turbopack) 0.044s 1.006s 0.962s 10 1.35x
🐘 Postgres Nitro 0.051s (-46.6% 🟢) 1.013s (-2.9%) 0.962s 10 1.55x
🌐 Redis Next.js (Turbopack) 0.054s 1.005s 0.951s 10 1.65x
🐘 Postgres Next.js (Turbopack) 0.057s 1.012s 0.955s 10 1.73x
🌐 MongoDB Next.js (Turbopack) 0.106s 1.007s 0.902s 10 3.24x
workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.070s (-5.4% 🟢) 2.005s (~) 0.936s 10 1.00x
💻 Local Express 1.073s (-4.7%) 2.007s (~) 0.934s 10 1.00x
🐘 Postgres Express 1.078s (-6.0% 🟢) 2.009s (~) 0.931s 10 1.01x
🐘 Postgres Nitro 1.090s (-4.4%) 2.009s (~) 0.919s 10 1.02x
💻 Local Next.js (Turbopack) 1.099s 2.007s 0.908s 10 1.03x
🌐 Redis Next.js (Turbopack) 1.116s 2.006s 0.890s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.120s 2.009s 0.889s 10 1.05x
🌐 MongoDB Next.js (Turbopack) 1.163s 2.008s 0.846s 10 1.09x
workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.407s (-4.9%) 11.021s (~) 0.615s 3 1.00x
🐘 Postgres Nitro 10.425s (-4.1%) 11.016s (~) 0.591s 3 1.00x
💻 Local Express 10.436s (-4.5%) 11.024s (~) 0.588s 3 1.00x
🐘 Postgres Express 10.458s (-4.6%) 11.018s (~) 0.560s 3 1.00x
💻 Local Next.js (Turbopack) 10.569s 11.025s 0.455s 3 1.02x
🌐 Redis Next.js (Turbopack) 10.652s 11.023s 0.370s 3 1.02x
🐘 Postgres Next.js (Turbopack) 10.689s 11.017s 0.328s 3 1.03x
🌐 MongoDB Next.js (Turbopack) 10.823s 11.016s 0.193s 3 1.04x
workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 13.449s (-10.7% 🟢) 14.027s (-12.5% 🟢) 0.578s 5 1.00x
🐘 Postgres Express 13.462s (-7.7% 🟢) 14.017s (-6.7% 🟢) 0.555s 5 1.00x
💻 Local Express 13.493s (-9.9% 🟢) 14.027s (-6.7% 🟢) 0.534s 5 1.00x
🐘 Postgres Nitro 13.519s (-7.4% 🟢) 14.016s (-6.7% 🟢) 0.497s 5 1.01x
💻 Local Next.js (Turbopack) 13.815s 14.029s 0.215s 5 1.03x
🌐 Redis Next.js (Turbopack) 14.089s 15.029s 0.941s 4 1.05x
🐘 Postgres Next.js (Turbopack) 14.117s 15.018s 0.901s 4 1.05x
🌐 MongoDB Next.js (Turbopack) 14.275s 15.019s 0.744s 4 1.06x
workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 11.863s (-29.3% 🟢) 12.023s (-29.4% 🟢) 0.159s 8 1.00x
🐘 Postgres Express 11.949s (-14.7% 🟢) 12.141s (-16.8% 🟢) 0.192s 8 1.01x
💻 Local Express 12.011s (-27.7% 🟢) 12.525s (-26.5% 🟢) 0.513s 8 1.01x
🐘 Postgres Nitro 12.021s (-13.9% 🟢) 12.396s (-13.4% 🟢) 0.375s 8 1.01x
💻 Local Next.js (Turbopack) 12.576s 13.025s 0.449s 7 1.06x
🌐 Redis Next.js (Turbopack) 12.974s 13.168s 0.193s 7 1.09x
🐘 Postgres Next.js (Turbopack) 13.169s 14.015s 0.845s 7 1.11x
🌐 MongoDB Next.js (Turbopack) 13.250s 14.018s 0.767s 7 1.12x
Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.141s (-9.5% 🟢) 2.007s (~) 0.866s 15 1.00x
🐘 Postgres Nitro 1.152s (-9.6% 🟢) 2.008s (~) 0.855s 15 1.01x
💻 Local Express 1.183s (-20.5% 🟢) 2.006s (~) 0.822s 15 1.04x
💻 Local Nitro 1.188s (-27.2% 🟢) 2.006s (-3.3%) 0.818s 15 1.04x
🐘 Postgres Next.js (Turbopack) 1.209s 2.006s 0.797s 15 1.06x
🌐 Redis Next.js (Turbopack) 1.257s 2.006s 0.749s 15 1.10x
💻 Local Next.js (Turbopack) 1.269s 2.006s 0.737s 15 1.11x
🌐 MongoDB Next.js (Turbopack) 2.051s 3.009s 0.958s 10 1.80x
Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.198s (-49.3% 🟢) 2.006s (-33.3% 🟢) 0.809s 15 1.00x
🐘 Postgres Nitro 1.229s (-47.7% 🟢) 2.007s (-33.3% 🟢) 0.778s 15 1.03x
🐘 Postgres Next.js (Turbopack) 1.353s 2.008s 0.655s 15 1.13x
💻 Local Nitro 1.698s (-46.0% 🟢) 2.005s (-48.4% 🟢) 0.307s 15 1.42x
💻 Local Next.js (Turbopack) 1.747s 2.006s 0.259s 15 1.46x
💻 Local Express 1.876s (-36.5% 🟢) 2.149s (-37.8% 🟢) 0.274s 14 1.57x
🌐 Redis Next.js (Turbopack) 2.374s 3.008s 0.634s 10 1.98x
🌐 MongoDB Next.js (Turbopack) 3.553s 4.010s 0.457s 8 2.97x
Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.309s (-62.5% 🟢) 2.007s (-49.9% 🟢) 0.698s 15 1.00x
🐘 Postgres Nitro 1.385s (-60.2% 🟢) 2.010s (-49.9% 🟢) 0.625s 15 1.06x
🐘 Postgres Next.js (Turbopack) 1.714s 2.154s 0.440s 14 1.31x
🌐 Redis Next.js (Turbopack) 3.635s 4.010s 0.375s 8 2.78x
💻 Local Next.js (Turbopack) 4.383s 5.012s 0.629s 6 3.35x
💻 Local Nitro 4.739s (-43.2% 🟢) 5.345s (-40.7% 🟢) 0.606s 6 3.62x
💻 Local Express 5.511s (-33.9% 🟢) 6.180s (-31.5% 🟢) 0.669s 6 4.21x
🌐 MongoDB Next.js (Turbopack) 6.295s 7.014s 0.718s 5 4.81x
Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.151s (-8.5% 🟢) 2.008s (~) 0.857s 15 1.00x
🐘 Postgres Nitro 1.158s (-7.8% 🟢) 2.008s (~) 0.850s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.217s 2.010s 0.792s 15 1.06x
🌐 Redis Next.js (Turbopack) 1.238s 2.006s 0.769s 15 1.08x
💻 Local Next.js (Turbopack) 1.333s 2.006s 0.673s 15 1.16x
💻 Local Express 1.393s (-26.4% 🟢) 2.007s (-15.1% 🟢) 0.614s 15 1.21x
💻 Local Nitro 1.395s (-25.2% 🟢) 2.006s (-14.3% 🟢) 0.611s 15 1.21x
🌐 MongoDB Next.js (Turbopack) 2.058s 3.008s 0.951s 10 1.79x
Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.209s (-48.4% 🟢) 2.007s (-33.3% 🟢) 0.799s 15 1.00x
🐘 Postgres Nitro 1.237s (-47.1% 🟢) 2.009s (-33.2% 🟢) 0.773s 15 1.02x
🐘 Postgres Next.js (Turbopack) 1.390s 2.007s 0.617s 15 1.15x
💻 Local Nitro 1.906s (-37.8% 🟢) 2.315s (-40.4% 🟢) 0.409s 13 1.58x
💻 Local Next.js (Turbopack) 2.068s 2.508s 0.441s 12 1.71x
💻 Local Express 2.139s (-31.7% 🟢) 2.508s (-33.3% 🟢) 0.369s 12 1.77x
🌐 Redis Next.js (Turbopack) 2.367s 3.008s 0.641s 10 1.96x
🌐 MongoDB Next.js (Turbopack) 3.586s 4.009s 0.423s 8 2.97x
Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.302s (-62.8% 🟢) 2.007s (-50.0% 🟢) 0.705s 15 1.00x
🐘 Postgres Nitro 1.398s (-59.8% 🟢) 2.008s (-49.9% 🟢) 0.610s 15 1.07x
🐘 Postgres Next.js (Turbopack) 1.666s 2.076s 0.410s 15 1.28x
🌐 Redis Next.js (Turbopack) 3.598s 4.010s 0.412s 8 2.76x
💻 Local Nitro 5.030s (-45.0% 🟢) 5.513s (-45.0% 🟢) 0.483s 6 3.86x
💻 Local Next.js (Turbopack) 5.111s 5.684s 0.573s 6 3.92x
💻 Local Express 5.857s (-33.4% 🟢) 6.351s (-31.5% 🟢) 0.493s 6 4.50x
🌐 MongoDB Next.js (Turbopack) 6.341s 7.011s 0.670s 5 4.87x
workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.463s (-44.8% 🟢) 1.023s (~) 0.560s 59 1.00x
🐘 Postgres Nitro 0.468s (-42.9% 🟢) 1.007s (~) 0.539s 60 1.01x
💻 Local Express 0.485s (-50.8% 🟢) 1.004s (-6.7% 🟢) 0.520s 60 1.05x
💻 Local Nitro 0.485s (-50.6% 🟢) 1.004s (-8.2% 🟢) 0.519s 60 1.05x
💻 Local Next.js (Turbopack) 0.607s 1.005s 0.398s 60 1.31x
🌐 Redis Next.js (Turbopack) 0.625s 1.004s 0.380s 60 1.35x
🐘 Postgres Next.js (Turbopack) 0.672s 1.006s 0.334s 60 1.45x
🌐 MongoDB Next.js (Turbopack) 0.752s 1.006s 0.253s 60 1.63x
workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.020s (-47.1% 🟢) 1.586s (-24.5% 🟢) 0.565s 57 1.00x
🐘 Postgres Express 1.024s (-48.2% 🟢) 1.506s (-33.3% 🟢) 0.482s 60 1.00x
💻 Local Nitro 1.170s (-61.4% 🟢) 2.005s (-46.6% 🟢) 0.835s 45 1.15x
💻 Local Express 1.230s (-59.2% 🟢) 2.006s (-44.1% 🟢) 0.776s 45 1.21x
🌐 Redis Next.js (Turbopack) 1.524s 2.006s 0.482s 45 1.49x
💻 Local Next.js (Turbopack) 1.544s 2.007s 0.463s 45 1.51x
🐘 Postgres Next.js (Turbopack) 1.600s 2.008s 0.408s 45 1.57x
🌐 MongoDB Next.js (Turbopack) 1.880s 2.008s 0.128s 45 1.84x
workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.047s (-48.7% 🟢) 2.507s (-42.6% 🟢) 0.460s 48 1.00x
🐘 Postgres Nitro 2.083s (-49.2% 🟢) 2.638s (-42.7% 🟢) 0.555s 46 1.02x
💻 Local Nitro 2.652s (-71.5% 🟢) 3.032s (-69.7% 🟢) 0.380s 40 1.30x
💻 Local Express 2.781s (-69.8% 🟢) 3.085s (-69.2% 🟢) 0.304s 39 1.36x
🌐 Redis Next.js (Turbopack) 3.031s 3.396s 0.365s 36 1.48x
🐘 Postgres Next.js (Turbopack) 3.169s 4.009s 0.840s 30 1.55x
💻 Local Next.js (Turbopack) 3.362s 4.009s 0.647s 30 1.64x
🌐 MongoDB Next.js (Turbopack) 4.220s 5.012s 0.791s 24 2.06x
workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.186s (-34.2% 🟢) 1.006s (~) 0.819s 60 1.00x
🐘 Postgres Express 0.196s (-30.7% 🟢) 1.023s (+1.5%) 0.827s 59 1.05x
🐘 Postgres Next.js (Turbopack) 0.239s 1.006s 0.767s 60 1.28x
🌐 Redis Next.js (Turbopack) 0.250s 1.004s 0.754s 60 1.34x
💻 Local Express 0.475s (-15.3% 🟢) 1.005s (~) 0.530s 60 2.55x
💻 Local Nitro 0.535s (-11.4% 🟢) 1.095s (+7.2% 🔺) 0.560s 55 2.87x
💻 Local Next.js (Turbopack) 0.580s 1.022s 0.442s 59 3.11x
🌐 MongoDB Next.js (Turbopack) 1.037s 1.825s 0.788s 33 5.57x
workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.296s (-42.0% 🟢) 1.005s (~) 0.709s 90 1.00x
🐘 Postgres Nitro 0.321s (-35.4% 🟢) 1.006s (~) 0.686s 90 1.08x
🌐 Redis Next.js (Turbopack) 0.422s 1.004s 0.582s 90 1.43x
🐘 Postgres Next.js (Turbopack) 0.469s 1.006s 0.536s 90 1.59x
💻 Local Nitro 2.212s (-12.8% 🟢) 2.944s (-2.2%) 0.732s 31 7.48x
💻 Local Express 2.268s (-9.8% 🟢) 3.009s (~) 0.741s 30 7.67x
💻 Local Next.js (Turbopack) 2.477s 3.113s 0.636s 29 8.37x
🌐 MongoDB Next.js (Turbopack) 2.600s 3.007s 0.407s 30 8.79x
workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.593s (-27.6% 🟢) 1.005s (-1.2%) 0.413s 120 1.00x
🐘 Postgres Nitro 0.671s (-15.0% 🟢) 1.007s (~) 0.335s 120 1.13x
🌐 Redis Next.js (Turbopack) 0.781s 1.004s 0.223s 120 1.32x
🐘 Postgres Next.js (Turbopack) 0.960s 1.419s 0.458s 85 1.62x
🌐 MongoDB Next.js (Turbopack) 5.450s 6.014s 0.563s 20 9.20x
💻 Local Nitro 9.823s (-12.2% 🟢) 10.445s (-10.4% 🟢) 0.622s 12 16.57x
💻 Local Express 10.781s (-3.7%) 11.214s (-6.1% 🟢) 0.433s 11 18.19x
💻 Local Next.js (Turbopack) 11.380s 12.030s 0.649s 10 19.20x
Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.130s (+451.0% 🔺) 2.001s (+100.4% 🔺) 0.001s (-25.0% 🟢) 2.009s (+98.6% 🔺) 0.879s 10 1.00x
💻 Local Nitro 1.133s (+430.4% 🔺) 2.005s (+99.6% 🔺) 0.011s (-15.2% 🟢) 2.017s (+98.0% 🔺) 0.884s 10 1.00x
💻 Local Express 1.134s (+469.6% 🔺) 2.005s (+99.6% 🔺) 0.013s (+5.0%) 2.020s (+98.4% 🔺) 0.886s 10 1.00x
🐘 Postgres Nitro 1.136s (+454.2% 🔺) 2.002s (+100.3% 🔺) 0.002s (+6.7% 🔺) 2.010s (+98.8% 🔺) 0.874s 10 1.01x
💻 Local Next.js (Turbopack) 1.162s 2.003s 0.010s 2.018s 0.856s 10 1.03x
🐘 Postgres Next.js (Turbopack) 1.193s 2.002s 0.001s 2.012s 0.819s 10 1.06x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -
stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.499s (+138.0% 🔺) 2.005s (+99.3% 🔺) 0.003s (-12.1% 🟢) 2.023s (+97.8% 🔺) 0.524s 30 1.00x
🐘 Postgres Nitro 1.547s (+147.9% 🔺) 2.007s (+99.3% 🔺) 0.004s (-6.5% 🟢) 2.028s (+98.3% 🔺) 0.481s 30 1.03x
🐘 Postgres Next.js (Turbopack) 1.669s 2.010s 0.004s 2.027s 0.358s 30 1.11x
💻 Local Nitro 1.697s (+102.3% 🔺) 2.011s (+98.7% 🔺) 0.010s (+7.1% 🔺) 2.202s (+97.4% 🔺) 0.506s 28 1.13x
💻 Local Express 1.746s (+130.7% 🔺) 2.013s (+95.6% 🔺) 0.011s (+13.8% 🔺) 2.205s (+112.0% 🔺) 0.458s 28 1.16x
💻 Local Next.js (Turbopack) 1.805s 2.010s 0.011s 2.204s 0.400s 28 1.20x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -
10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.678s (-29.5% 🟢) 1.052s (-17.7% 🟢) 0.000s (+61.4% 🔺) 1.060s (-18.9% 🟢) 0.382s 57 1.00x
🐘 Postgres Nitro 0.705s (-27.2% 🟢) 1.070s (-14.2% 🟢) 0.000s (-57.1% 🟢) 1.087s (-13.5% 🟢) 0.382s 56 1.04x
🐘 Postgres Next.js (Turbopack) 0.801s 1.072s 0.000s 1.079s 0.278s 56 1.18x
💻 Local Nitro 1.344s (+9.9% 🔺) 2.016s (~) 0.000s (+366.7% 🔺) 2.018s (~) 0.674s 30 1.98x
💻 Local Express 1.391s (+13.5% 🔺) 2.015s (~) 0.000s (-30.0% 🟢) 2.017s (~) 0.626s 30 2.05x
💻 Local Next.js (Turbopack) 1.476s 2.013s 0.000s 2.017s 0.541s 30 2.18x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -
fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.349s (-23.9% 🟢) 2.034s (-6.6% 🟢) 0.000s (+Infinity% 🔺) 2.042s (-7.1% 🟢) 0.693s 30 1.00x
🐘 Postgres Nitro 1.349s (-24.7% 🟢) 2.100s (-1.9%) 0.000s (-100.0% 🟢) 2.126s (-2.2%) 0.777s 29 1.00x
🐘 Postgres Next.js (Turbopack) 1.811s 2.225s 0.000s 2.232s 0.421s 27 1.34x
💻 Local Next.js (Turbopack) 3.029s 3.526s 0.001s 3.531s 0.502s 18 2.25x
💻 Local Nitro 3.052s (-9.9% 🟢) 3.841s (-4.7%) 0.000s (-29.7% 🟢) 3.844s (-4.8%) 0.793s 16 2.26x
💻 Local Express 3.255s (-6.1% 🟢) 4.030s (~) 0.001s (-16.7% 🟢) 4.032s (~) 0.777s 15 2.41x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 14/21
🐘 Postgres Express 18/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 18/21
Next.js (Turbopack) 🐘 Postgres 10/21
Nitro 🐘 Postgres 15/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DurableAgent/WorkflowAgent duplicates doStreamStep return size

1 participant