Skip to content

[ai] Reduce doStreamStep step boundary payload#1932

Draft
VaguelySerious wants to merge 1 commit intomainfrom
peter/issue-1929-reduce-stream-step-payload
Draft

[ai] Reduce doStreamStep step boundary payload#1932
VaguelySerious wants to merge 1 commit 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 5, 2026 2:53am
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 5, 2026 2:53am
example-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-astro-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-express-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-fastify-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-hono-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-nitro-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-nuxt-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-sveltekit-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-tanstack-start-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workbench-vite-workflow Ready Ready Preview, Comment May 5, 2026 2:53am
workflow-docs Ready Ready Preview, Comment, Open in v0 May 5, 2026 2:53am
workflow-swc-playground Ready Ready Preview, Comment May 5, 2026 2:53am
workflow-tarballs Ready Ready Preview, Comment May 5, 2026 2:53am
workflow-web Ready Ready Preview, Comment May 5, 2026 2:53am

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: 8dbc11a

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

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 925 0 219 1144
✅ 💻 Local Development 1237 0 219 1456
✅ 📦 Local Production 1237 0 219 1456
✅ 🐘 Local Postgres 1237 0 219 1456
✅ 🪟 Windows 104 0 0 104
✅ 📋 Other 552 0 176 728
Total 5292 0 1052 6344

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 78 0 26
✅ example 78 0 26
✅ express 78 0 26
✅ fastify 78 0 26
✅ hono 78 0 26
✅ nextjs-turbopack 102 0 2
✅ nextjs-webpack 102 0 2
✅ nitro 78 0 26
✅ nuxt 78 0 26
✅ sveltekit 97 0 7
✅ vite 78 0 26
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 79 0 25
✅ express-stable 79 0 25
✅ fastify-stable 79 0 25
✅ hono-stable 79 0 25
✅ nextjs-turbopack-canary 85 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 104 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 104 0 0
✅ nextjs-webpack-canary 85 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 104 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 104 0 0
✅ nitro-stable 79 0 25
✅ nuxt-stable 79 0 25
✅ sveltekit-stable 98 0 6
✅ vite-stable 79 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 79 0 25
✅ express-stable 79 0 25
✅ fastify-stable 79 0 25
✅ hono-stable 79 0 25
✅ nextjs-turbopack-canary 85 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 104 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 104 0 0
✅ nextjs-webpack-canary 85 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 104 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 104 0 0
✅ nitro-stable 79 0 25
✅ nuxt-stable 79 0 25
✅ sveltekit-stable 98 0 6
✅ vite-stable 79 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 79 0 25
✅ express-stable 79 0 25
✅ fastify-stable 79 0 25
✅ hono-stable 79 0 25
✅ nextjs-turbopack-canary 85 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 104 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 104 0 0
✅ nextjs-webpack-canary 85 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 104 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 104 0 0
✅ nitro-stable 79 0 25
✅ nuxt-stable 79 0 25
✅ sveltekit-stable 98 0 6
✅ vite-stable 79 0 25
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 104 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 79 0 25
✅ e2e-local-dev-tanstack-start- 79 0 25
✅ e2e-local-postgres-nest-stable 79 0 25
✅ e2e-local-postgres-tanstack-start- 79 0 25
✅ e2e-local-prod-nest-stable 79 0 25
✅ e2e-local-prod-tanstack-start- 79 0 25
✅ e2e-vercel-prod-tanstack-start 78 0 26

📋 View full workflow run

@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.031s (-29.1% 🟢) 1.005s (~) 0.974s 10 1.00x
💻 Local Nitro 0.031s (-27.1% 🟢) 1.005s (~) 0.973s 10 1.00x
🐘 Postgres Express 0.047s (-19.3% 🟢) 1.011s (~) 0.964s 10 1.49x
💻 Local Next.js (Turbopack) 0.049s 1.005s 0.957s 10 1.55x
🐘 Postgres Nitro 0.051s (-46.0% 🟢) 1.014s (-2.8%) 0.962s 10 1.64x
🌐 Redis Next.js (Turbopack) 0.054s 1.005s 0.950s 10 1.73x
🐘 Postgres Next.js (Turbopack) 0.059s 1.012s 0.953s 10 1.87x
🌐 MongoDB Next.js (Turbopack) 0.102s 1.009s 0.907s 10 3.25x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.197s (-52.0% 🟢) 1.521s (-39.4% 🟢) 1.324s 10 1.00x
▲ Vercel Express 0.255s (+8.4% 🔺) 2.041s (-4.4%) 1.786s 10 1.30x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.065s (-5.8% 🟢) 2.005s (~) 0.940s 10 1.00x
💻 Local Express 1.075s (-4.5%) 2.006s (~) 0.931s 10 1.01x
🐘 Postgres Nitro 1.081s (-5.2% 🟢) 2.009s (~) 0.928s 10 1.01x
🐘 Postgres Express 1.087s (-5.2% 🟢) 2.010s (~) 0.923s 10 1.02x
🌐 Redis Next.js (Turbopack) 1.112s 2.007s 0.895s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.119s 2.010s 0.891s 10 1.05x
💻 Local Next.js (Turbopack) 1.119s 2.006s 0.887s 10 1.05x
🌐 MongoDB Next.js (Turbopack) 1.173s 2.009s 0.835s 10 1.10x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.576s (-59.5% 🟢) 3.527s (-40.3% 🟢) 1.951s 10 1.00x
▲ Vercel Express 1.586s (-15.4% 🟢) 3.726s (-2.1%) 2.139s 10 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.403s (-5.0%) 11.021s (~) 0.618s 3 1.00x
🐘 Postgres Nitro 10.405s (-4.3%) 11.016s (~) 0.611s 3 1.00x
💻 Local Express 10.420s (-4.6%) 11.022s (~) 0.602s 3 1.00x
🐘 Postgres Express 10.460s (-4.6%) 11.019s (~) 0.559s 3 1.01x
💻 Local Next.js (Turbopack) 10.659s 11.022s 0.363s 3 1.02x
🌐 Redis Next.js (Turbopack) 10.670s 11.023s 0.353s 3 1.03x
🐘 Postgres Next.js (Turbopack) 10.706s 11.016s 0.310s 3 1.03x
🌐 MongoDB Next.js (Turbopack) 10.842s 11.021s 0.179s 3 1.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 13.614s (-19.8% 🟢) 15.567s (-22.2% 🟢) 1.953s 2 1.00x
▲ Vercel Nitro 15.247s (-35.8% 🟢) 17.002s (-32.3% 🟢) 1.755s 3 1.12x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 13.456s (-10.7% 🟢) 14.026s (-12.5% 🟢) 0.570s 5 1.00x
🐘 Postgres Nitro 13.464s (-7.8% 🟢) 14.021s (-6.7% 🟢) 0.557s 5 1.00x
🐘 Postgres Express 13.473s (-7.6% 🟢) 14.016s (-6.7% 🟢) 0.543s 5 1.00x
💻 Local Express 13.478s (-10.0% 🟢) 14.026s (-6.7% 🟢) 0.548s 5 1.00x
🌐 Redis Next.js (Turbopack) 14.029s 14.629s 0.600s 5 1.04x
💻 Local Next.js (Turbopack) 14.085s 15.029s 0.945s 4 1.05x
🐘 Postgres Next.js (Turbopack) 14.110s 15.018s 0.908s 4 1.05x
🌐 MongoDB Next.js (Turbopack) 14.201s 15.024s 0.823s 4 1.06x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 21.041s (-58.2% 🟢) 22.966s (-56.3% 🟢) 1.926s 3 1.00x
▲ Vercel Nitro 22.498s (-65.1% 🟢) 24.282s (-63.6% 🟢) 1.784s 3 1.07x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 11.881s (-29.2% 🟢) 12.021s (-29.4% 🟢) 0.141s 8 1.00x
💻 Local Express 11.907s (-28.3% 🟢) 12.022s (-29.4% 🟢) 0.115s 8 1.00x
🐘 Postgres Express 11.930s (-14.8% 🟢) 12.141s (-16.8% 🟢) 0.210s 8 1.00x
🐘 Postgres Nitro 11.935s (-14.5% 🟢) 12.265s (-14.3% 🟢) 0.330s 8 1.00x
🌐 Redis Next.js (Turbopack) 12.958s 13.312s 0.354s 7 1.09x
💻 Local Next.js (Turbopack) 13.012s 13.451s 0.439s 7 1.10x
🐘 Postgres Next.js (Turbopack) 13.292s 14.017s 0.725s 7 1.12x
🌐 MongoDB Next.js (Turbopack) 13.348s 14.024s 0.677s 7 1.12x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 33.883s (-92.0% 🟢) 35.556s (-91.6% 🟢) 1.673s 3 1.00x
▲ Vercel Express 35.826s (-70.4% 🟢) 37.915s (-69.3% 🟢) 2.089s 3 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.141s (-10.5% 🟢) 2.008s (~) 0.867s 15 1.00x
🐘 Postgres Express 1.161s (-7.9% 🟢) 2.008s (~) 0.846s 15 1.02x
💻 Local Express 1.181s (-20.7% 🟢) 2.006s (~) 0.825s 15 1.03x
💻 Local Nitro 1.187s (-27.2% 🟢) 2.005s (-3.3%) 0.818s 15 1.04x
🐘 Postgres Next.js (Turbopack) 1.212s 2.006s 0.794s 15 1.06x
🌐 Redis Next.js (Turbopack) 1.257s 2.006s 0.749s 15 1.10x
💻 Local Next.js (Turbopack) 1.293s 2.006s 0.712s 15 1.13x
🌐 MongoDB Next.js (Turbopack) 2.043s 3.009s 0.966s 10 1.79x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.947s (+4.6%) 4.411s (+2.1%) 1.464s 7 1.00x
▲ Vercel Express 3.290s (+15.0% 🔺) 4.975s (+7.6% 🔺) 1.686s 7 1.12x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.214s (-48.4% 🟢) 2.007s (-33.3% 🟢) 0.793s 15 1.00x
🐘 Postgres Express 1.239s (-47.5% 🟢) 2.007s (-33.3% 🟢) 0.768s 15 1.02x
🐘 Postgres Next.js (Turbopack) 1.372s 2.007s 0.635s 15 1.13x
💻 Local Nitro 1.770s (-43.7% 🟢) 2.006s (-48.4% 🟢) 0.236s 15 1.46x
💻 Local Express 1.805s (-38.9% 🟢) 2.073s (-40.0% 🟢) 0.268s 15 1.49x
💻 Local Next.js (Turbopack) 1.817s 2.006s 0.189s 15 1.50x
🌐 Redis Next.js (Turbopack) 2.369s 3.008s 0.639s 10 1.95x
🌐 MongoDB Next.js (Turbopack) 3.582s 4.011s 0.429s 8 2.95x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.342s (-17.5% 🟢) 4.952s (-16.4% 🟢) 1.610s 7 1.00x
▲ Vercel Express 3.556s (-1.7%) 5.443s (+6.5% 🔺) 1.887s 6 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.381s (-60.3% 🟢) 2.008s (-49.9% 🟢) 0.627s 15 1.00x
🐘 Postgres Express 1.392s (-60.1% 🟢) 2.008s (-49.9% 🟢) 0.616s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.685s 2.008s 0.323s 15 1.22x
🌐 Redis Next.js (Turbopack) 3.605s 4.010s 0.405s 8 2.61x
💻 Local Nitro 5.076s (-39.2% 🟢) 5.513s (-38.9% 🟢) 0.437s 6 3.68x
💻 Local Express 5.321s (-36.2% 🟢) 5.678s (-37.1% 🟢) 0.358s 6 3.85x
💻 Local Next.js (Turbopack) 5.549s 6.212s 0.663s 5 4.02x
🌐 MongoDB Next.js (Turbopack) 6.293s 7.015s 0.722s 5 4.56x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.805s (+13.3% 🔺) 6.588s (+7.5% 🔺) 1.783s 5 1.00x
▲ Vercel Nitro 6.816s (+93.4% 🔺) 8.676s (+56.8% 🔺) 1.860s 4 1.42x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.139s (-9.4% 🟢) 2.008s (~) 0.869s 15 1.00x
🐘 Postgres Express 1.173s (-6.7% 🟢) 2.007s (~) 0.834s 15 1.03x
🐘 Postgres Next.js (Turbopack) 1.223s 2.009s 0.786s 15 1.07x
🌐 Redis Next.js (Turbopack) 1.231s 2.006s 0.776s 15 1.08x
💻 Local Next.js (Turbopack) 1.366s 2.006s 0.639s 15 1.20x
💻 Local Nitro 1.375s (-26.3% 🟢) 2.006s (-14.3% 🟢) 0.632s 15 1.21x
💻 Local Express 1.425s (-24.8% 🟢) 2.006s (-15.1% 🟢) 0.582s 15 1.25x
🌐 MongoDB Next.js (Turbopack) 2.052s 2.918s 0.866s 11 1.80x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.759s (+6.9% 🔺) 4.433s (+1.9%) 1.674s 7 1.00x
▲ Vercel Nitro 2.931s (+19.2% 🔺) 4.558s (+9.3% 🔺) 1.627s 7 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.254s (-46.4% 🟢) 2.008s (-33.3% 🟢) 0.754s 15 1.00x
🐘 Postgres Nitro 1.261s (-46.1% 🟢) 2.009s (-33.3% 🟢) 0.748s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.365s 2.007s 0.643s 15 1.09x
💻 Local Next.js (Turbopack) 2.018s 2.591s 0.573s 12 1.61x
💻 Local Nitro 2.063s (-32.7% 🟢) 2.509s (-35.4% 🟢) 0.445s 12 1.65x
💻 Local Express 2.114s (-32.5% 🟢) 2.509s (-33.3% 🟢) 0.395s 12 1.69x
🌐 Redis Next.js (Turbopack) 2.355s 3.008s 0.653s 10 1.88x
🌐 MongoDB Next.js (Turbopack) 3.601s 4.011s 0.410s 8 2.87x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.432s (+7.5% 🔺) 5.213s (+8.8% 🔺) 1.782s 6 1.00x
▲ Vercel Nitro 3.540s (+9.5% 🔺) 5.236s (+3.1%) 1.696s 6 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.371s (-60.8% 🟢) 2.007s (-50.0% 🟢) 0.636s 15 1.00x
🐘 Postgres Nitro 1.383s (-60.2% 🟢) 2.009s (-49.9% 🟢) 0.626s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.649s 2.074s 0.425s 15 1.20x
🌐 Redis Next.js (Turbopack) 3.615s 4.010s 0.395s 8 2.64x
💻 Local Nitro 6.012s (-34.3% 🟢) 6.349s (-36.7% 🟢) 0.337s 6 4.39x
💻 Local Next.js (Turbopack) 6.106s 6.615s 0.509s 5 4.46x
💻 Local Express 6.117s (-30.5% 🟢) 6.513s (-29.8% 🟢) 0.395s 6 4.46x
🌐 MongoDB Next.js (Turbopack) 6.355s 7.015s 0.660s 5 4.64x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.570s (-28.8% 🟢) 6.358s (-22.3% 🟢) 1.788s 5 1.00x
▲ Vercel Nitro 4.700s (-7.7% 🟢) 6.328s (-7.2% 🟢) 1.628s 5 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.433s (-48.4% 🟢) 1.006s (-1.7%) 0.573s 60 1.00x
🐘 Postgres Nitro 0.447s (-45.5% 🟢) 1.007s (~) 0.560s 60 1.03x
💻 Local Nitro 0.456s (-53.5% 🟢) 1.004s (-8.2% 🟢) 0.547s 60 1.05x
💻 Local Express 0.480s (-51.2% 🟢) 1.004s (-6.7% 🟢) 0.524s 60 1.11x
🌐 Redis Next.js (Turbopack) 0.613s 1.004s 0.391s 60 1.41x
🐘 Postgres Next.js (Turbopack) 0.678s 1.006s 0.329s 60 1.56x
💻 Local Next.js (Turbopack) 0.727s 1.005s 0.277s 60 1.68x
🌐 MongoDB Next.js (Turbopack) 0.745s 1.006s 0.261s 60 1.72x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.208s (-72.6% 🟢) 7.030s (-67.0% 🟢) 1.822s 9 1.00x
▲ Vercel Nitro 5.276s (-76.1% 🟢) 7.014s (-70.8% 🟢) 1.739s 9 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.032s (-46.5% 🟢) 1.458s (-30.6% 🟢) 0.426s 62 1.00x
🐘 Postgres Express 1.072s (-45.8% 🟢) 1.843s (-18.4% 🟢) 0.771s 49 1.04x
💻 Local Nitro 1.155s (-61.9% 🟢) 2.006s (-46.6% 🟢) 0.851s 45 1.12x
💻 Local Express 1.190s (-60.6% 🟢) 2.006s (-44.1% 🟢) 0.816s 45 1.15x
🌐 Redis Next.js (Turbopack) 1.497s 2.006s 0.509s 45 1.45x
🐘 Postgres Next.js (Turbopack) 1.617s 2.007s 0.390s 45 1.57x
💻 Local Next.js (Turbopack) 1.778s 2.006s 0.227s 45 1.72x
🌐 MongoDB Next.js (Turbopack) 1.860s 2.008s 0.147s 45 1.80x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 13.853s (-59.9% 🟢) 15.730s (-57.3% 🟢) 1.877s 6 1.00x
▲ Vercel Nitro 14.069s (-64.4% 🟢) 16.014s (-61.2% 🟢) 1.945s 6 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.093s (-49.0% 🟢) 2.674s (-41.9% 🟢) 0.581s 45 1.00x
🐘 Postgres Express 2.116s (-47.0% 🟢) 2.638s (-39.6% 🟢) 0.522s 46 1.01x
💻 Local Nitro 2.615s (-71.9% 🟢) 3.007s (-70.0% 🟢) 0.392s 40 1.25x
💻 Local Express 2.676s (-70.9% 🟢) 3.008s (-70.0% 🟢) 0.332s 40 1.28x
🌐 Redis Next.js (Turbopack) 2.956s 3.110s 0.153s 39 1.41x
🐘 Postgres Next.js (Turbopack) 3.213s 4.010s 0.796s 30 1.54x
💻 Local Next.js (Turbopack) 3.871s 4.146s 0.275s 29 1.85x
🌐 MongoDB Next.js (Turbopack) 4.226s 5.012s 0.785s 24 2.02x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 53.207s (-59.1% 🟢) 54.945s (-58.4% 🟢) 1.737s 3 1.00x
▲ Vercel Nitro 59.625s (-38.5% 🟢) 61.520s (-37.5% 🟢) 1.895s 2 1.12x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.181s (-36.3% 🟢) 1.006s (~) 0.825s 60 1.00x
🐘 Postgres Express 0.186s (-34.0% 🟢) 1.006s (~) 0.819s 60 1.03x
🌐 Redis Next.js (Turbopack) 0.249s 1.004s 0.755s 60 1.38x
🐘 Postgres Next.js (Turbopack) 0.250s 1.006s 0.757s 60 1.38x
💻 Local Nitro 0.428s (-29.2% 🟢) 1.004s (-1.7%) 0.576s 60 2.37x
💻 Local Express 0.442s (-21.1% 🟢) 1.005s (~) 0.563s 60 2.45x
💻 Local Next.js (Turbopack) 0.560s 1.004s 0.444s 60 3.10x
🌐 MongoDB Next.js (Turbopack) 1.026s 1.655s 0.629s 37 5.68x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.092s (+26.0% 🔺) 3.766s (+12.4% 🔺) 1.674s 17 1.00x
▲ Vercel Express 2.129s (+8.9% 🔺) 3.879s (+6.7% 🔺) 1.750s 16 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.308s (-38.0% 🟢) 1.006s (~) 0.699s 90 1.00x
🐘 Postgres Express 0.317s (-37.8% 🟢) 1.006s (~) 0.689s 90 1.03x
🌐 Redis Next.js (Turbopack) 0.415s 1.004s 0.589s 90 1.35x
🐘 Postgres Next.js (Turbopack) 0.468s 1.006s 0.538s 90 1.52x
💻 Local Nitro 2.208s (-13.0% 🟢) 2.976s (-1.1%) 0.768s 31 7.18x
💻 Local Express 2.304s (-8.3% 🟢) 3.009s (~) 0.705s 30 7.49x
💻 Local Next.js (Turbopack) 2.489s 3.076s 0.586s 30 8.09x
🌐 MongoDB Next.js (Turbopack) 2.597s 3.006s 0.409s 30 8.44x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 7.659s (+151.4% 🔺) 9.487s (+97.3% 🔺) 1.827s 10 1.00x
▲ Vercel Nitro 8.101s (+151.1% 🔺) 9.595s (+99.0% 🔺) 1.495s 10 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.638s (-19.2% 🟢) 1.006s (~) 0.368s 120 1.00x
🐘 Postgres Express 0.662s (-19.2% 🟢) 1.006s (-1.2%) 0.344s 120 1.04x
🌐 Redis Next.js (Turbopack) 0.768s 1.004s 0.236s 120 1.20x
🐘 Postgres Next.js (Turbopack) 0.959s 1.471s 0.512s 82 1.50x
🌐 MongoDB Next.js (Turbopack) 5.398s 6.012s 0.614s 20 8.46x
💻 Local Nitro 9.958s (-11.0% 🟢) 10.612s (-9.0% 🟢) 0.655s 12 15.60x
💻 Local Express 10.428s (-6.8% 🟢) 11.028s (-7.6% 🟢) 0.600s 11 16.34x
💻 Local Next.js (Turbopack) 11.504s 12.131s 0.628s 10 18.02x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 19.512s (+163.0% 🔺) 21.503s (+132.6% 🔺) 1.991s 6 1.00x
▲ Vercel Nitro 26.961s (+249.1% 🔺) 28.870s (+207.1% 🔺) 1.910s 5 1.38x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.128s (+427.9% 🔺) 2.005s (+99.6% 🔺) 0.013s (+2.4%) 2.020s (+98.2% 🔺) 0.891s 10 1.00x
🐘 Postgres Nitro 1.128s (+450.3% 🔺) 1.999s (+100.0% 🔺) 0.001s (-13.3% 🟢) 2.010s (+98.8% 🔺) 0.882s 10 1.00x
💻 Local Express 1.133s (+469.1% 🔺) 2.005s (+99.6% 🔺) 0.013s (+5.0%) 2.020s (+98.4% 🔺) 0.887s 10 1.00x
🐘 Postgres Express 1.137s (+454.3% 🔺) 1.997s (+100.0% 🔺) 0.002s (-6.3% 🟢) 2.010s (+98.7% 🔺) 0.873s 10 1.01x
💻 Local Next.js (Turbopack) 1.173s 2.004s 0.013s 2.020s 0.847s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.194s 2.002s 0.001s 2.010s 0.816s 10 1.06x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.164s (-13.6% 🟢) 3.341s (-18.3% 🟢) 1.696s (+76.5% 🔺) 5.492s (-1.8%) 3.329s 10 1.00x
▲ Vercel Nitro 2.196s (-42.7% 🟢) 3.379s (-36.0% 🟢) 2.193s (+195.6% 🔺) 6.042s (-6.8% 🟢) 3.846s 10 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.511s (+142.0% 🔺) 2.001s (+98.7% 🔺) 0.004s (-6.5% 🟢) 2.025s (+98.0% 🔺) 0.514s 30 1.00x
💻 Local Nitro 1.526s (+81.9% 🔺) 2.012s (+98.8% 🔺) 0.010s (+10.3% 🔺) 2.024s (+81.3% 🔺) 0.498s 30 1.01x
🐘 Postgres Express 1.535s (+143.7% 🔺) 2.002s (+98.9% 🔺) 0.004s (~) 2.028s (+98.2% 🔺) 0.492s 30 1.02x
💻 Local Express 1.538s (+103.2% 🔺) 2.013s (+95.6% 🔺) 0.010s (+4.8%) 2.025s (+94.7% 🔺) 0.486s 30 1.02x
🐘 Postgres Next.js (Turbopack) 1.660s 2.010s 0.004s 2.025s 0.365s 30 1.10x
💻 Local Next.js (Turbopack) 1.670s 2.011s 0.011s 2.025s 0.355s 30 1.11x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 5.885s (-80.0% 🟢) 7.234s (-76.5% 🟢) 0.232s (+106.7% 🔺) 7.919s (-75.1% 🟢) 2.034s 8 1.00x
▲ Vercel Express 6.109s (-6.1% 🟢) 7.748s (-3.3%) 0.265s (-35.1% 🟢) 8.427s (-4.6%) 2.318s 8 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.634s (-34.6% 🟢) 1.031s (-17.4% 🟢) 0.000s (-17.2% 🟢) 1.041s (-17.2% 🟢) 0.407s 58 1.00x
🐘 Postgres Express 0.683s (-28.9% 🟢) 1.031s (-19.3% 🟢) 0.000s (-60.3% 🟢) 1.049s (-19.7% 🟢) 0.366s 58 1.08x
🐘 Postgres Next.js (Turbopack) 0.811s 1.053s 0.000s 1.065s 0.254s 57 1.28x
💻 Local Nitro 1.335s (+9.2% 🔺) 2.015s (~) 0.000s (+100.0% 🔺) 2.017s (~) 0.682s 30 2.11x
💻 Local Express 1.387s (+13.3% 🔺) 2.015s (~) 0.000s (-30.0% 🟢) 2.017s (~) 0.630s 30 2.19x
💻 Local Next.js (Turbopack) 1.455s 2.014s 0.000s 2.017s 0.562s 30 2.30x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.599s (-3.8%) 4.888s (-4.2%) 0.003s (+1595.8% 🔺) 5.311s (-4.0%) 1.711s 12 1.00x
▲ Vercel Nitro 3.620s (+18.7% 🔺) 5.082s (+15.7% 🔺) 0.000s (+18.2% 🔺) 5.520s (+14.8% 🔺) 1.900s 11 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

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.069s (-5.0%) 0.000s (+Infinity% 🔺) 2.081s (-5.3% 🟢) 0.732s 29 1.00x
🐘 Postgres Nitro 1.377s (-23.1% 🟢) 2.101s (-1.9%) 0.000s (+189.7% 🔺) 2.113s (-2.8%) 0.735s 29 1.02x
🐘 Postgres Next.js (Turbopack) 1.833s 2.401s 0.000s 2.410s 0.577s 25 1.36x
💻 Local Next.js (Turbopack) 2.925s 3.420s 0.001s 3.425s 0.500s 18 2.17x
💻 Local Nitro 3.021s (-10.8% 🟢) 3.675s (-8.9% 🟢) 0.000s (-11.8% 🟢) 3.678s (-8.9% 🟢) 0.657s 17 2.24x
💻 Local Express 3.161s (-8.8% 🟢) 3.907s (-3.1%) 0.001s (-21.9% 🟢) 3.910s (-3.1%) 0.748s 16 2.34x
🌐 MongoDB Next.js (Turbopack) ⚠️ missing - - - - -
🌐 Redis Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.562s (+21.2% 🔺) 7.040s (+16.9% 🔺) 0.001s (+Infinity% 🔺) 7.520s (+16.5% 🔺) 1.957s 8 1.00x
▲ Vercel Nitro 5.721s (+39.8% 🔺) 7.366s (+37.1% 🔺) 0.000s (-8.3% 🟢) 7.795s (+34.5% 🔺) 2.073s 8 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 16/21
🐘 Postgres Nitro 15/21
▲ Vercel Express 14/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 16/21
Next.js (Turbopack) 🌐 Redis 9/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