Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Fix Next lazy discovery step imports by ijjk · Pull Request #2263 · vercel/workflow · GitHub
Skip to content

Fix Next lazy discovery step imports - #2263

Merged
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports
Jun 5, 2026
Merged

Fix Next lazy discovery step imports#2263
ijjk merged 1 commit into
mainfrom
ijjk/next-lazy-discovery-step-imports

Conversation

@ijjk

@ijjkijjk commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid creating a separate esbuild steps bundle for Next.js lazy discovery
  • import discovered step files through the generated flow route for Turbopack
  • map workspace package source files to built dist files for route imports

Testing

  • pnpm exec tsc -p packages/next/tsconfig.json --noEmit
  • pnpm exec vitest run packages/next/src/builder-deferred.test.ts packages/next/src/builder.test.ts packages/next/src/index.test.ts
  • cd packages/next && pnpm build
  • cd workbench/nextjs-turbopack && pnpm build

@vercel

vercelBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 268861a

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

This PR includes changesets to release 16 packages
NameType
@workflow/nextPatch
workflowPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.042s (-3.0%)1.005s (~)0.964s101.00x
💻 LocalExpress0.042s (-3.5%)1.005s (~)0.964s101.00x
💻 LocalNext.js (Turbopack)0.059s (+7.8% 🔺)1.006s (~)0.947s101.43x
🐘 PostgresNitro0.062s (-2.1%)1.012s (~)0.950s101.49x
🐘 PostgresExpress0.064s (-2.9%)1.015s (~)0.951s101.55x
🐘 PostgresNext.js (Turbopack)0.097s (+39.0% 🔺)1.038s (+2.5%)0.940s102.34x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.256s (-22.3% 🟢)2.078s (-11.2% 🟢)1.822s101.00x
▲ VercelExpress0.339s (+24.5% 🔺)2.751s (+1.4%)2.412s101.33x
▲ VercelNitro0.341s (+30.4% 🔺)3.219s (+32.1% 🔺)2.878s101.33x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.088s (-0.7%)2.006s (~)0.918s101.00x
💻 LocalExpress1.096s (~)2.006s (~)0.909s101.01x
🐘 PostgresExpress1.108s (+1.5%)2.009s (~)0.901s101.02x
🐘 PostgresNitro1.112s (~)2.010s (~)0.898s101.02x
💻 LocalNext.js (Turbopack)1.141s (+2.9%)2.006s (~)0.865s101.05x
🐘 PostgresNext.js (Turbopack)1.197s (+4.9%)2.037s (+1.5%)0.840s101.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.701s (+8.6% 🔺)3.391s (-3.9%)1.690s101.00x
▲ VercelExpress1.710s (+8.0% 🔺)3.482s (-2.5%)1.771s101.01x
▲ VercelNext.js (Turbopack)1.847s (+10.9% 🔺)4.003s (-1.8%)2.156s101.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.510s (~)11.021s (~)0.511s31.00x
🐘 PostgresNitro10.574s (~)11.019s (~)0.445s31.01x
💻 LocalExpress10.578s (~)11.020s (~)0.442s31.01x
🐘 PostgresExpress10.667s (~)11.014s (-3.0%)0.348s31.01x
💻 LocalNext.js (Turbopack)10.945s (+3.2%)11.356s (+3.0%)0.411s31.04x
🐘 PostgresNext.js (Turbopack)10.959s (+1.3%)11.684s (+6.1% 🔺)0.725s31.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.341s (~)14.814s (-5.0%)1.473s31.00x
▲ VercelNext.js (Turbopack)13.398s (-0.7%)15.957s (-0.9%)2.560s21.00x
▲ VercelExpress13.564s (+3.1%)15.455s (~)1.891s21.02x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.682s (~)14.027s (~)0.345s51.00x
🐘 PostgresNitro13.771s (-0.6%)14.018s (~)0.247s51.01x
🐘 PostgresExpress13.775s (~)14.018s (-1.5%)0.243s51.01x
💻 LocalExpress13.857s (~)14.227s (~)0.370s51.01x
🐘 PostgresNext.js (Turbopack)14.081s (-3.5%)14.814s (-1.4%)0.733s51.03x
💻 LocalNext.js (Turbopack)14.281s (+1.8%)15.029s (+2.8%)0.748s41.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express20.528s (-19.4% 🟢)22.546s (-17.3% 🟢)2.018s31.00x
▲ VercelNitro20.691s (-18.9% 🟢)22.120s (-19.9% 🟢)1.429s31.01x
▲ VercelNext.js (Turbopack)20.811s (-18.4% 🟢)23.147s (-14.9% 🟢)2.336s31.01x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.321s (-0.7%)13.025s (~)0.704s71.00x
🐘 PostgresNitro12.471s (-2.1%)13.017s (~)0.546s71.01x
💻 LocalExpress12.542s (~)13.024s (~)0.482s71.02x
🐘 PostgresExpress12.594s (-1.1%)13.021s (-2.2%)0.427s71.02x
💻 LocalNext.js (Turbopack)13.678s (+5.6% 🔺)14.026s (+5.4% 🔺)0.348s71.11x
🐘 PostgresNext.js (Turbopack)14.130s (+2.7%)14.728s (+5.1% 🔺)0.598s71.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)28.043s (-5.3% 🟢)30.285s (-4.9%)2.242s31.00x
▲ VercelNitro28.454s (-2.0%)30.177s (-3.9%)1.723s31.01x
▲ VercelExpress28.666s (-10.6% 🟢)31.054s (-9.3% 🟢)2.388s31.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.159s (-8.2% 🟢)2.006s (~)0.847s151.00x
🐘 PostgresExpress1.189s (-0.9%)2.008s (-0.7%)0.820s151.03x
🐘 PostgresNext.js (Turbopack)1.204s (-3.8%)2.009s (~)0.805s151.04x
💻 LocalNitro1.234s (+1.7%)2.006s (~)0.772s151.06x
🐘 PostgresNitro1.246s (+3.9%)2.074s (+3.3%)0.829s151.07x
💻 LocalNext.js (Turbopack)1.345s (+10.0% 🔺)2.007s (~)0.661s151.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.688s (~)4.700s (+11.4% 🔺)2.012s71.00x
▲ VercelNitro3.122s (+12.7% 🔺)4.728s (+8.9% 🔺)1.606s71.16x
▲ VercelExpress4.797s (+73.3% 🔺)6.214s (+31.6% 🔺)1.417s51.78x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.268s (-4.4%)2.007s (~)0.739s151.00x
🐘 PostgresNitro1.273s (+1.1%)2.007s (~)0.735s151.00x
🐘 PostgresNext.js (Turbopack)1.371s (-2.7%)2.014s (~)0.643s151.08x
💻 LocalExpress1.648s (-12.5% 🟢)2.006s (-9.7% 🟢)0.358s151.30x
💻 LocalNitro1.692s (-0.8%)2.006s (-3.2%)0.314s151.33x
💻 LocalNext.js (Turbopack)1.816s (+5.2% 🔺)2.006s (~)0.190s151.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.762s (-7.6% 🟢)5.413s (-12.8% 🟢)1.651s61.00x
▲ VercelNext.js (Turbopack)4.087s (~)5.910s (-3.7%)1.823s61.09x
▲ VercelExpress5.259s (+28.8% 🔺)6.905s (+11.9% 🔺)1.646s51.40x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-0.8%)2.009s (~)0.614s151.00x
🐘 PostgresExpress1.404s (+0.7%)2.007s (~)0.603s151.01x
🐘 PostgresNext.js (Turbopack)1.773s (+0.8%)2.397s (+4.4%)0.624s131.27x
💻 LocalExpress4.306s (-18.7% 🟢)4.725s (-21.4% 🟢)0.418s73.09x
💻 LocalNitro4.371s (-7.4% 🟢)5.012s (~)0.641s73.13x
💻 LocalNext.js (Turbopack)5.200s (+18.3% 🔺)5.681s (+13.4% 🔺)0.480s63.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.422s (-7.7% 🟢)7.704s (-1.0%)2.282s51.00x
▲ VercelExpress5.628s (-4.7%)7.674s (-2.8%)2.046s41.04x
▲ VercelNitro6.136s (-8.9% 🟢)7.936s (-8.9% 🟢)1.800s41.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.184s (-1.3%)2.008s (~)0.824s151.00x
🐘 PostgresExpress1.184s (-1.5%)2.008s (~)0.823s151.00x
🐘 PostgresNext.js (Turbopack)1.287s (+1.7%)2.062s (+2.6%)0.775s151.09x
💻 LocalExpress1.419s (-14.3% 🟢)2.006s (-3.3%)0.587s151.20x
💻 LocalNitro1.514s (-1.9%)2.006s (~)0.492s151.28x
💻 LocalNext.js (Turbopack)1.758s (+34.6% 🔺)2.391s (+19.2% 🔺)0.634s131.49x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.401s (-6.5% 🟢)3.718s (-11.4% 🟢)1.318s91.00x
▲ VercelNext.js (Turbopack)2.604s (-40.4% 🟢)4.335s (-31.1% 🟢)1.731s81.08x
▲ VercelNitro3.182s (+19.1% 🔺)4.323s (~)1.141s71.33x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.255s (-1.5%)2.009s (~)0.753s151.00x
🐘 PostgresExpress1.275s (+2.6%)2.007s (~)0.732s151.02x
🐘 PostgresNext.js (Turbopack)1.617s (+15.8% 🔺)2.366s (+17.9% 🔺)0.749s141.29x
💻 LocalExpress1.776s (-16.4% 🟢)2.073s (-20.0% 🟢)0.297s151.41x
💻 LocalNext.js (Turbopack)2.069s (+2.4%)3.009s (+20.1% 🔺)0.940s101.65x
💻 LocalNitro2.114s (+20.3% 🔺)2.675s (+29.1% 🔺)0.561s121.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.405s (-16.8% 🟢)4.865s (-19.0% 🟢)1.460s71.00x
▲ VercelNext.js (Turbopack)3.938s (-12.9% 🟢)5.845s (-5.2% 🟢)1.906s61.16x
▲ VercelExpress4.202s (+14.3% 🔺)5.972s (+6.4% 🔺)1.770s61.23x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.400s (-6.7% 🟢)2.007s (-16.3% 🟢)0.607s151.00x
🐘 PostgresNitro1.408s (-3.7%)2.008s (~)0.600s151.01x
🐘 PostgresNext.js (Turbopack)1.518s (-8.3% 🟢)2.007s (-3.2%)0.490s151.08x
💻 LocalExpress4.392s (-25.1% 🟢)5.012s (-19.3% 🟢)0.620s63.14x
💻 LocalNitro5.080s (+7.1% 🔺)5.514s (+3.2%)0.434s63.63x
💻 LocalNext.js (Turbopack)5.805s (+12.5% 🔺)6.416s (+6.6% 🔺)0.611s54.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.172s (+4.9%)6.834s (+1.4%)1.662s51.00x
▲ VercelNext.js (Turbopack)5.195s (-10.3% 🟢)7.508s (-0.9%)2.312s51.00x
▲ VercelExpress5.853s (+15.3% 🔺)7.403s (+11.7% 🔺)1.551s51.13x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.565s (-15.2% 🟢)1.006s (-4.0%)0.441s601.00x
💻 LocalNitro0.581s (-27.8% 🟢)1.004s (-16.6% 🟢)0.423s601.03x
🐘 PostgresNitro0.612s (+0.6%)1.041s (+3.4%)0.429s581.08x
💻 LocalExpress0.682s (+4.0%)1.096s (+5.4% 🔺)0.414s551.21x
🐘 PostgresNext.js (Turbopack)0.736s (-9.3% 🟢)1.066s (+5.9% 🔺)0.330s571.30x
💻 LocalNext.js (Turbopack)0.861s (+23.7% 🔺)1.039s (+3.5%)0.178s581.52x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.047s (-32.4% 🟢)6.610s (-30.6% 🟢)1.563s101.00x
▲ VercelNext.js (Turbopack)5.324s (+5.5% 🔺)7.623s (+11.3% 🔺)2.299s81.05x
▲ VercelExpress5.407s (-1.7%)7.008s (-1.5%)1.601s91.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.361s (-11.4% 🟢)2.030s (-5.7% 🟢)0.669s451.00x
🐘 PostgresNitro1.362s (-3.9%)2.031s (+1.2%)0.669s451.00x
💻 LocalNitro1.483s (+1.3%)2.028s (+1.1%)0.545s451.09x
💻 LocalExpress1.509s (-5.2% 🟢)2.006s (-1.1%)0.497s451.11x
🐘 PostgresNext.js (Turbopack)1.742s (-10.3% 🟢)2.214s (+1.8%)0.472s411.28x
💻 LocalNext.js (Turbopack)2.082s (+20.5% 🔺)2.882s (+42.1% 🔺)0.800s321.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.603s (-4.7%)14.457s (-6.6% 🟢)1.854s71.00x
▲ VercelNext.js (Turbopack)13.005s (-12.0% 🟢)15.161s (-10.5% 🟢)2.157s61.03x
▲ VercelExpress13.199s (-19.4% 🟢)14.954s (-18.4% 🟢)1.755s71.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.673s (-8.2% 🟢)3.083s (-6.0% 🟢)0.410s401.00x
🐘 PostgresExpress2.687s (-7.7% 🟢)3.058s (-13.6% 🟢)0.371s401.01x
💻 LocalNitro3.172s (-1.1%)3.821s (-4.7%)0.649s321.19x
💻 LocalExpress3.229s (-5.6% 🟢)3.945s (-1.6%)0.716s311.21x
🐘 PostgresNext.js (Turbopack)3.850s (~)4.559s (+11.8% 🔺)0.710s271.44x
💻 LocalNext.js (Turbopack)4.249s (+14.0% 🔺)5.010s (+21.9% 🔺)0.762s241.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro26.086s (-12.4% 🟢)28.208s (-11.8% 🟢)2.122s51.00x
▲ VercelExpress26.847s (-6.9% 🟢)29.075s (-5.9% 🟢)2.228s51.03x
▲ VercelNext.js (Turbopack)27.148s (+0.6%)30.131s (+3.0%)2.983s41.04x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.214s (-15.2% 🟢)1.006s (~)0.792s601.00x
🐘 PostgresNitro0.228s (-3.1%)1.006s (~)0.778s601.07x
🐘 PostgresNext.js (Turbopack)0.242s (-14.2% 🟢)1.013s (+0.6%)0.771s601.13x
💻 LocalExpress0.402s (-13.4% 🟢)1.004s (~)0.602s601.88x
💻 LocalNitro0.408s (-3.8%)1.004s (~)0.596s601.91x
💻 LocalNext.js (Turbopack)0.545s (-10.8% 🟢)1.005s (-3.3%)0.460s602.55x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.458s (+11.1% 🔺)3.849s (-6.1% 🟢)1.392s161.00x
▲ VercelNitro2.590s (+10.4% 🔺)4.021s (-7.2% 🟢)1.432s161.05x
▲ VercelNext.js (Turbopack)2.801s (+27.4% 🔺)4.703s (+11.4% 🔺)1.902s131.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.361s (+6.5% 🔺)1.007s (~)0.646s901.00x
🐘 PostgresNitro0.393s (+6.1% 🔺)1.018s (+1.1%)0.624s891.09x
🐘 PostgresNext.js (Turbopack)0.473s (-2.0%)1.037s (+3.1%)0.564s871.31x
💻 LocalExpress2.016s (-8.0% 🟢)2.509s (-11.1% 🟢)0.493s365.58x
💻 LocalNitro2.079s (+0.7%)2.637s (~)0.557s355.76x
💻 LocalNext.js (Turbopack)2.434s (-0.7%)3.043s (-2.1%)0.609s306.74x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.693s (-87.0% 🟢)7.010s (-84.7% 🟢)1.317s131.00x
▲ VercelNext.js (Turbopack)5.835s (-7.0% 🟢)7.878s (-7.3% 🟢)2.043s121.02x
▲ VercelExpress6.083s (-86.0% 🟢)7.817s (-82.7% 🟢)1.733s121.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.693s (+10.8% 🔺)1.006s (-4.6%)0.313s1201.00x
🐘 PostgresNitro0.699s (-1.2%)1.007s (~)0.308s1201.01x
🐘 PostgresNext.js (Turbopack)0.830s (-15.2% 🟢)1.269s (-21.1% 🟢)0.438s951.20x
💻 LocalExpress9.045s (-12.3% 🟢)9.560s (-12.0% 🟢)0.516s1313.05x
💻 LocalNitro9.283s (+6.6% 🔺)9.950s (+6.6% 🔺)0.666s1313.39x
💻 LocalNext.js (Turbopack)10.583s (+2.6%)11.301s (~)0.718s1115.27x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.296s (-91.7% 🟢)15.499s (-90.5% 🟢)2.202s81.00x
▲ VercelExpress16.057s (+5.3% 🔺)17.561s (~)1.503s71.21x
▲ VercelNitro18.730s (-94.0% 🟢)20.062s (-93.6% 🟢)1.333s71.41x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.154s (-1.3%)2.005s (~)0.010s (-19.5% 🟢)2.018s (~)0.864s101.00x
💻 LocalNitro1.156s (~)2.005s (~)0.010s (+2.0%)2.018s (~)0.861s101.00x
🐘 PostgresExpress1.167s (-2.2%)1.995s (~)0.001s (-95.9% 🟢)2.011s (-1.6%)0.844s101.01x
🐘 PostgresNitro1.194s (+1.1%)1.999s (~)0.001s (-21.4% 🟢)2.011s (~)0.817s101.03x
💻 LocalNext.js (Turbopack)1.209s (+3.5%)2.003s (~)0.012s (+21.8% 🔺)2.019s (~)0.810s101.05x
🐘 PostgresNext.js (Turbopack)1.277s (+3.5%)1.999s (~)0.000s (-73.3% 🟢)2.019s (~)0.742s101.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.218s (+3.4%)3.286s (-3.6%)2.899s (+451.4% 🔺)6.675s (+50.1% 🔺)4.458s101.00x
▲ VercelNitro2.286s (+5.6% 🔺)3.776s (+10.5% 🔺)1.934s (+274.9% 🔺)6.184s (+38.4% 🔺)3.898s101.03x
▲ VercelNext.js (Turbopack)2.540s (+13.3% 🔺)3.389s (-4.6%)1.993s (-83.9% 🟢)6.064s (-63.2% 🟢)3.524s101.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-10.4% 🟢)2.009s (~)0.009s (+4.3%)2.020s (-8.1% 🟢)0.460s301.00x
💻 LocalExpress1.572s (-3.9%)2.010s (~)0.012s (+4.5%)2.023s (~)0.451s301.01x
🐘 PostgresExpress1.604s (-7.7% 🟢)2.005s (-6.4% 🟢)0.004s (+32.1% 🔺)2.026s (-6.2% 🟢)0.421s301.03x
🐘 PostgresNitro1.617s (-2.8%)2.008s (~)0.004s (+4.3%)2.028s (~)0.411s301.04x
💻 LocalNext.js (Turbopack)1.747s (+6.5% 🔺)2.009s (~)0.011s (+5.6% 🔺)2.023s (~)0.275s301.12x
🐘 PostgresNext.js (Turbopack)1.840s (+4.3%)2.299s (+14.3% 🔺)0.002s (-45.8% 🟢)2.322s (+14.5% 🔺)0.482s271.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.918s (+2.8%)6.741s (-9.3% 🟢)0.253s (-28.5% 🟢)7.433s (-11.6% 🟢)1.515s91.00x
▲ VercelNitro6.031s (+5.0%)7.093s (-6.6% 🟢)0.368s (+9.1% 🔺)7.887s (-7.0% 🟢)1.856s81.02x
▲ VercelNext.js (Turbopack)6.102s (-4.2%)7.817s (-1.5%)0.276s (-23.8% 🟢)8.598s (-3.0%)2.496s71.03x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.710s (-27.4% 🟢)1.050s (-26.5% 🟢)0.000s (-1.8%)1.060s (-26.9% 🟢)0.349s571.00x
🐘 PostgresNitro0.728s (+0.7%)1.050s (+1.8%)0.000s (-83.0% 🟢)1.060s (+1.2%)0.333s571.02x
🐘 PostgresNext.js (Turbopack)0.984s (+18.2% 🔺)1.394s (+30.1% 🔺)0.000s (+30.2% 🔺)1.413s (+30.9% 🔺)0.429s431.39x
💻 LocalNitro1.371s (+1.3%)2.013s (~)0.000s (-20.0% 🟢)2.015s (~)0.645s301.93x
💻 LocalExpress1.403s (-5.4% 🟢)2.014s (~)0.000s (-66.7% 🟢)2.016s (~)0.613s301.98x
💻 LocalNext.js (Turbopack)1.476s (+2.0%)2.013s (~)0.000s (-37.5% 🟢)2.016s (~)0.540s302.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.626s (+9.6% 🔺)5.049s (+3.2%)0.000s (NaN%)5.578s (+2.1%)1.953s111.00x
▲ VercelExpress3.698s (-8.9% 🟢)4.854s (-9.1% 🟢)0.000s (-100.0% 🟢)5.278s (-14.4% 🟢)1.580s121.02x
▲ VercelNitro4.263s (+18.4% 🔺)5.435s (+7.1% 🔺)0.000s (+Infinity% 🔺)5.843s (+3.8%)1.579s121.18x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.426s (-11.7% 🟢)2.100s (-6.8% 🟢)0.000s (+Infinity% 🔺)2.127s (-6.7% 🟢)0.701s291.00x
🐘 PostgresNitro1.503s (+6.6% 🔺)2.177s (+9.1% 🔺)0.000s (NaN%)2.191s (+8.9% 🔺)0.689s281.05x
🐘 PostgresNext.js (Turbopack)1.707s (-1.2%)2.274s (+0.5%)0.000s (NaN%)2.309s (+1.8%)0.601s261.20x
💻 LocalNext.js (Turbopack)2.997s (-6.7% 🟢)3.617s (-7.2% 🟢)0.000s (+50.6% 🔺)3.621s (-7.1% 🟢)0.624s172.10x
💻 LocalExpress3.109s (-6.7% 🟢)3.776s (-1.6%)0.000s (-16.7% 🟢)3.778s (-1.7%)0.670s162.18x
💻 LocalNitro3.374s (+8.3% 🔺)3.827s (-1.8%)0.000s (+60.0% 🔺)4.163s (+6.7% 🔺)0.788s152.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.555s (-21.1% 🟢)6.892s (-19.6% 🟢)0.000s (NaN%)7.306s (-19.6% 🟢)1.751s91.00x
▲ VercelExpress5.627s (-11.0% 🟢)6.885s (-9.7% 🟢)0.000s (-100.0% 🟢)7.369s (-10.0% 🟢)1.742s91.01x
▲ VercelNext.js (Turbopack)5.825s (+12.7% 🔺)7.852s (+17.6% 🔺)0.000s (-71.9% 🟢)8.485s (+17.8% 🔺)2.659s81.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresExpress13/21
▲ VercelNitro10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres12/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from a92ab93 to 1cffb60CompareJune 5, 2026 05:22
@vercel
vercelBottemporarily deployed to Preview – example-nextjs-workflow-turbopack June 5, 2026 06:30 Inactive
@ijjk
ijjkforce-pushed the ijjk/next-lazy-discovery-step-imports branch from 6c131fa to 263b0aaCompareJune 5, 2026 06:30

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: no blocking issues.

Validated beyond the PR's build check by building the turbopack workbench in lazy-discovery mode and inspecting the real output:

  • Generated flow route emits no separate __step_registrations.js bundle; discovered step sources are imported directly as side-effect imports, and the @workflow/ai workspace source resolves to its dist output via the new srcdist mapping.
  • Confirmed the registration survives Next's production tree-shaking: the compiled server chunk contains globalThis[...].set("step//@workflow/ai/agent@<ver>//closeStream", ...), so the bare side-effect import is retained and the step registers at runtime. The PR's pnpm build alone doesn't prove this.
  • Verified the manifest/runtime stepId invariant: the manifest is generated from the source file while the route imports the built dist file, but the stepId is derived from package name + version + function name (not the file path), so both agree. This is what makes the src→dist swap safe.
  • Added local-only tests for the two otherwise-uncovered branches in the dist mapping: .mts.mjs, and the dist-missing fallback (correctly falls back to importing the source rather than a non-existent dist path). Both pass.
  • Unit tests and index/builder suites pass locally; full CI matrix (turbopack + webpack, lazy on/off, dev/prod/postgres) is green.

);

return importSpecifiers
.map((specifier) => `import ${JSON.stringify(specifier)};`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review: Note

These are bare side-effect imports, so retention depends on the bundler not tree-shaking side-effect-only imports. App-local files and workspace packages with no sideEffects field are safe — I verified Turbopack keeps the @workflow/ai registration in the compiled server bundle.

The gap: a workspace step package that declares "sideEffects": false could have its generated import "...dist/x.js" legally pruned by webpack, silently dropping step registration. The previous combined bundle guarded against this by importing a named __steps_registered binding and doing void __steps_registered. Non-blocking, but worth either a comment noting the constraint or a sideEffects: false fixture package in the webpack lazy-discovery e2e to lock in coverage.

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 0b8b077 (AI decision).

This commit fixes V2-specific Next.js lazy discovery behavior that exists only on main. The modified builder-deferred.ts on stable has a fundamentally different architecture (no V2 combined route, different discovered-entries shape, has step-copy-utils), and the createDeferredFlowRoute/__step_registrations flow being repaired doesn't exist on stable. Similarly, the e2e changes target V2-only code paths (e.g. the hasStepSourceMaps branches edited here don't exist on stable).

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

0b8b077345cd7d51b0726e8248335708e6ac27ea

Sign up for freeto 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.

2 participants

@ijjk@VaguelySerious