Skip to content

[next] make lazyDiscovery the default in withWorkflow#1805

Merged
TooTallNate merged 6 commits into
mainfrom
nr/lazy-discovery-default-true
May 22, 2026
Merged

[next] make lazyDiscovery the default in withWorkflow#1805
TooTallNate merged 6 commits into
mainfrom
nr/lazy-discovery-default-true

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

Summary

  • Flip the default for workflows.lazyDiscovery in withWorkflow from false to true so new projects automatically get deferred workflow discovery on Next.js >= 16.2.0-canary.48
  • Users can opt back into eager discovery with workflows: { lazyDiscovery: false } on supported Next.js versions
  • Drop the now-redundant lazyDiscovery: true from the nextjs-turbopack and nextjs-webpack workbench apps
  • Reword the version-fallback warning and update the matching e2e assertion
  • Update the withWorkflow docs to reflect the new default

Companion PR

The companion change for stable (which keeps the current default but removes the workbench override so stable e2e tests still exercise eager mode) is in #1804.

Flips the default for `workflows.lazyDiscovery` from `false` to `true`
so new projects get deferred workflow discovery automatically on Next.js
versions that support deferred entries (>= 16.2.0-canary.48). Older
versions continue to fall back to eager discovery.

Users can still opt back into eager discovery explicitly by passing
`workflows: { lazyDiscovery: false }`.

Also:
- Remove the now-redundant `lazyDiscovery: true` from the Next.js
  workbench apps.
- Reword the fallback warning for clarity when lazy is the default.
- Update the local-build e2e assertion to match the new warning text.
- Update the withWorkflow docs with the new default.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 17, 2026

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

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

@TooTallNate TooTallNate requested review from a team and ijjk as code owners April 17, 2026 21:23
Copilot AI review requested due to automatic review settings April 17, 2026 21:23
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: ebc2d07

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

This PR includes changesets to release 16 packages
Name Type
@workflow/next Minor
workflow Patch
@workflow/world-testing Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1222 0 219 1441
✅ 💻 Local Development 1615 0 219 1834
✅ 📦 Local Production 1615 0 219 1834
✅ 🐘 Local Postgres 1615 0 219 1834
✅ 🪟 Windows 131 0 0 131
✅ 📋 Other 741 0 176 917
Total 6939 0 1052 7991

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 105 0 26
✅ example 105 0 26
✅ express 105 0 26
✅ fastify 105 0 26
✅ hono 105 0 26
✅ nextjs-turbopack 129 0 2
✅ nextjs-webpack 129 0 2
✅ nitro 105 0 26
✅ nuxt 105 0 26
✅ sveltekit 124 0 7
✅ vite 105 0 26
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 106 0 25
✅ express-stable 106 0 25
✅ fastify-stable 106 0 25
✅ hono-stable 106 0 25
✅ nextjs-turbopack-canary 112 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 131 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 131 0 0
✅ nextjs-webpack-canary 112 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 131 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 131 0 0
✅ nitro-stable 106 0 25
✅ nuxt-stable 106 0 25
✅ sveltekit-stable 125 0 6
✅ vite-stable 106 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 106 0 25
✅ express-stable 106 0 25
✅ fastify-stable 106 0 25
✅ hono-stable 106 0 25
✅ nextjs-turbopack-canary 112 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 131 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 131 0 0
✅ nextjs-webpack-canary 112 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 131 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 131 0 0
✅ nitro-stable 106 0 25
✅ nuxt-stable 106 0 25
✅ sveltekit-stable 125 0 6
✅ vite-stable 106 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 106 0 25
✅ express-stable 106 0 25
✅ fastify-stable 106 0 25
✅ hono-stable 106 0 25
✅ nextjs-turbopack-canary 112 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 131 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 131 0 0
✅ nextjs-webpack-canary 112 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 131 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 131 0 0
✅ nitro-stable 106 0 25
✅ nuxt-stable 106 0 25
✅ sveltekit-stable 125 0 6
✅ vite-stable 106 0 25
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 131 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 106 0 25
✅ e2e-local-dev-tanstack-start- 106 0 25
✅ e2e-local-postgres-nest-stable 106 0 25
✅ e2e-local-postgres-tanstack-start- 106 0 25
✅ e2e-local-prod-nest-stable 106 0 25
✅ e2e-local-prod-tanstack-start- 106 0 25
✅ e2e-vercel-prod-tanstack-start 105 0 26

📋 View full workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.031s (-30.0% 🟢) 1.005s (~) 0.974s 10 1.00x
💻 Local Nitro 0.032s (-26.5% 🟢) 1.005s (~) 0.974s 10 1.02x
💻 Local Next.js (Turbopack) 0.047s 1.005s 0.958s 10 1.53x
🐘 Postgres Nitro 0.050s (-47.3% 🟢) 1.012s (-3.0%) 0.961s 10 1.62x
🐘 Postgres Next.js (Turbopack) 0.059s 1.011s 0.952s 10 1.91x
🐘 Postgres Express 0.108s (+85.9% 🔺) 1.017s (+0.6%) 0.909s 10 3.48x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.242s (-3.7%) 2.255s (-3.4%) 2.012s 10 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.071s (-5.3% 🟢) 2.005s (~) 0.934s 10 1.00x
💻 Local Express 1.076s (-4.4%) 2.005s (~) 0.929s 10 1.00x
🐘 Postgres Nitro 1.081s (-5.2% 🟢) 2.009s (~) 0.928s 10 1.01x
💻 Local Next.js (Turbopack) 1.115s 2.006s 0.891s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.131s 2.010s 0.880s 10 1.06x
🐘 Postgres Express 1.212s (+5.7% 🔺) 2.036s (+1.3%) 0.824s 10 1.13x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 1.603s (-21.2% 🟢) 3.584s (-6.4% 🟢) 1.981s 10 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.401s (-5.0%) 11.020s (~) 0.619s 3 1.00x
🐘 Postgres Nitro 10.406s (-4.3%) 11.015s (~) 0.609s 3 1.00x
💻 Local Express 10.416s (-4.6%) 11.019s (~) 0.603s 3 1.00x
💻 Local Next.js (Turbopack) 10.687s 11.022s 0.335s 3 1.03x
🐘 Postgres Next.js (Turbopack) 10.727s 11.020s 0.293s 3 1.03x
🐘 Postgres Express 10.786s (-1.6%) 11.372s (+3.2%) 0.587s 3 1.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 14.752s (-14.8% 🟢) 16.208s (-16.4% 🟢) 1.456s 2 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 13.459s (-7.8% 🟢) 14.017s (-6.7% 🟢) 0.558s 5 1.00x
💻 Local Express 13.465s (-10.1% 🟢) 14.025s (-6.7% 🟢) 0.561s 5 1.00x
💻 Local Nitro 13.492s (-10.4% 🟢) 14.027s (-12.5% 🟢) 0.535s 5 1.00x
💻 Local Next.js (Turbopack) 14.086s 15.030s 0.944s 4 1.05x
🐘 Postgres Next.js (Turbopack) 14.125s 15.020s 0.895s 4 1.05x
🐘 Postgres Express 14.203s (-2.6%) 14.845s (-1.2%) 0.643s 5 1.06x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 23.853s (-54.6% 🟢) 25.769s (-52.8% 🟢) 1.916s 3 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 11.883s (-28.4% 🟢) 12.021s (-29.4% 🟢) 0.138s 8 1.00x
🐘 Postgres Nitro 11.932s (-14.6% 🟢) 12.268s (-14.3% 🟢) 0.336s 8 1.00x
💻 Local Nitro 11.935s (-28.9% 🟢) 12.147s (-28.7% 🟢) 0.211s 8 1.00x
💻 Local Next.js (Turbopack) 13.118s 13.883s 0.766s 7 1.10x
🐘 Postgres Next.js (Turbopack) 13.136s 14.017s 0.881s 7 1.11x
🐘 Postgres Express 13.242s (-5.5% 🟢) 13.738s (-5.9% 🟢) 0.496s 7 1.11x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 35.553s (-91.0% 🟢) 37.774s (-90.4% 🟢) 2.221s 3 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.149s (-9.9% 🟢) 2.007s (~) 0.858s 15 1.00x
💻 Local Express 1.150s (-22.8% 🟢) 2.006s (~) 0.856s 15 1.00x
💻 Local Nitro 1.151s (-29.5% 🟢) 2.006s (-3.3%) 0.855s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.204s 2.007s 0.803s 15 1.05x
💻 Local Next.js (Turbopack) 1.290s 2.006s 0.716s 15 1.12x
🐘 Postgres Express 1.472s (+16.8% 🔺) 2.106s (+4.8%) 0.634s 15 1.28x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.133s (-7.8% 🟢) 4.424s (-10.3% 🟢) 1.291s 7 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.202s (-48.9% 🟢) 2.006s (-33.3% 🟢) 0.804s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.373s 2.008s 0.635s 15 1.14x
💻 Local Nitro 1.571s (-50.0% 🟢) 2.006s (-48.4% 🟢) 0.435s 15 1.31x
💻 Local Express 1.598s (-45.9% 🟢) 2.005s (-41.9% 🟢) 0.407s 15 1.33x
💻 Local Next.js (Turbopack) 1.680s 2.073s 0.392s 15 1.40x
🐘 Postgres Express 1.905s (-19.3% 🟢) 2.548s (-15.3% 🟢) 0.643s 12 1.58x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 4.533s (-36.2% 🟢) 6.164s (-30.8% 🟢) 1.631s 5 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.341s (-61.5% 🟢) 2.007s (-49.9% 🟢) 0.666s 15 1.00x
🐘 Postgres Express 1.619s (-53.6% 🟢) 2.501s (-37.6% 🟢) 0.882s 13 1.21x
🐘 Postgres Next.js (Turbopack) 1.630s 2.007s 0.377s 15 1.22x
💻 Local Express 4.065s (-51.2% 🟢) 4.581s (-49.2% 🟢) 0.516s 7 3.03x
💻 Local Nitro 4.094s (-51.0% 🟢) 4.870s (-46.0% 🟢) 0.776s 7 3.05x
💻 Local Next.js (Turbopack) 4.810s 5.179s 0.368s 6 3.59x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 7.521s (-15.6% 🟢) 8.871s (-19.1% 🟢) 1.350s 4 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.165s (-7.3% 🟢) 2.007s (~) 0.842s 15 1.00x
💻 Local Nitro 1.209s (-35.2% 🟢) 2.006s (-14.3% 🟢) 0.797s 15 1.04x
🐘 Postgres Next.js (Turbopack) 1.223s 2.008s 0.786s 15 1.05x
💻 Local Next.js (Turbopack) 1.319s 2.006s 0.686s 15 1.13x
💻 Local Express 1.322s (-30.2% 🟢) 2.006s (-15.1% 🟢) 0.684s 15 1.13x
🐘 Postgres Express 1.421s (+13.0% 🔺) 2.010s (~) 0.589s 15 1.22x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.142s (+7.2% 🔺) 4.723s (+1.7%) 1.581s 7 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.205s (-48.5% 🟢) 2.007s (-33.3% 🟢) 0.803s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.356s 2.008s 0.652s 15 1.13x
🐘 Postgres Express 1.647s (-29.7% 🟢) 2.331s (-22.6% 🟢) 0.684s 13 1.37x
💻 Local Express 1.674s (-46.5% 🟢) 2.072s (-44.9% 🟢) 0.398s 15 1.39x
💻 Local Nitro 1.753s (-42.8% 🟢) 2.005s (-48.4% 🟢) 0.252s 15 1.46x
💻 Local Next.js (Turbopack) 2.008s 2.316s 0.308s 13 1.67x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 4.498s (+43.1% 🔺) 5.919s (+30.9% 🔺) 1.421s 6 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.314s (-62.2% 🟢) 2.006s (-50.0% 🟢) 0.692s 15 1.00x
🐘 Postgres Express 1.586s (-54.7% 🟢) 2.338s (-41.7% 🟢) 0.751s 13 1.21x
🐘 Postgres Next.js (Turbopack) 1.644s 2.007s 0.363s 15 1.25x
💻 Local Express 4.588s (-47.9% 🟢) 5.179s (-44.1% 🟢) 0.591s 6 3.49x
💻 Local Nitro 4.611s (-49.6% 🟢) 5.178s (-48.3% 🟢) 0.567s 6 3.51x
💻 Local Next.js (Turbopack) 4.845s 5.345s 0.501s 6 3.69x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 6.309s (-6.6% 🟢) 8.141s (-4.7%) 1.832s 4 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.462s (-53.0% 🟢) 1.003s (-6.8% 🟢) 0.541s 60 1.00x
💻 Local Nitro 0.489s (-50.2% 🟢) 1.021s (-6.7% 🟢) 0.532s 59 1.06x
🐘 Postgres Nitro 0.501s (-38.9% 🟢) 1.042s (+3.5%) 0.540s 58 1.08x
🐘 Postgres Next.js (Turbopack) 0.660s 1.006s 0.346s 60 1.43x
🐘 Postgres Express 0.707s (-15.7% 🟢) 1.135s (+10.9% 🔺) 0.428s 53 1.53x
💻 Local Next.js (Turbopack) 0.739s 1.005s 0.265s 60 1.60x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 5.583s (-61.5% 🟢) 7.119s (-55.7% 🟢) 1.536s 9 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.048s (-45.6% 🟢) 1.757s (-16.4% 🟢) 0.709s 52 1.00x
💻 Local Express 1.148s (-61.9% 🟢) 2.005s (-44.1% 🟢) 0.857s 45 1.09x
💻 Local Nitro 1.211s (-60.1% 🟢) 2.005s (-46.6% 🟢) 0.794s 45 1.16x
🐘 Postgres Express 1.551s (-21.5% 🟢) 2.113s (-6.4% 🟢) 0.562s 43 1.48x
🐘 Postgres Next.js (Turbopack) 1.638s 2.008s 0.369s 45 1.56x
💻 Local Next.js (Turbopack) 1.868s 2.028s 0.160s 45 1.78x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 13.578s (-72.7% 🟢) 15.253s (-70.5% 🟢) 1.675s 7 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.129s (-48.1% 🟢) 2.616s (-43.2% 🟢) 0.487s 46 1.00x
💻 Local Express 2.555s (-72.3% 🟢) 3.007s (-70.0% 🟢) 0.452s 40 1.20x
💻 Local Nitro 2.638s (-71.6% 🟢) 3.008s (-70.0% 🟢) 0.370s 40 1.24x
🐘 Postgres Express 2.953s (-26.0% 🟢) 3.436s (-21.4% 🟢) 0.482s 35 1.39x
🐘 Postgres Next.js (Turbopack) 3.243s 4.010s 0.767s 30 1.52x
💻 Local Next.js (Turbopack) 3.971s 4.330s 0.359s 28 1.87x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 33.093s (-69.1% 🟢) 34.975s (-67.9% 🟢) 1.883s 4 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.207s (-27.0% 🟢) 1.023s (+1.5%) 0.816s 59 1.00x
🐘 Postgres Next.js (Turbopack) 0.243s 1.010s 0.766s 60 1.18x
💻 Local Express 0.360s (-35.7% 🟢) 1.004s (~) 0.643s 60 1.74x
💻 Local Nitro 0.363s (-39.9% 🟢) 1.004s (-1.7%) 0.640s 60 1.76x
🐘 Postgres Express 0.387s (+37.1% 🔺) 1.037s (+2.9%) 0.650s 58 1.87x
💻 Local Next.js (Turbopack) 0.533s 1.004s 0.472s 60 2.58x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.698s (+33.4% 🔺) 4.021s (+6.0% 🔺) 1.322s 16 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.301s (-39.4% 🟢) 1.006s (~) 0.705s 90 1.00x
🐘 Postgres Next.js (Turbopack) 0.458s 1.006s 0.548s 90 1.52x
🐘 Postgres Express 0.605s (+18.7% 🔺) 1.151s (+14.4% 🔺) 0.546s 79 2.01x
💻 Local Express 1.987s (-20.9% 🟢) 2.440s (-18.9% 🟢) 0.453s 37 6.61x
💻 Local Nitro 2.070s (-18.4% 🟢) 2.565s (-14.8% 🟢) 0.495s 36 6.89x
💻 Local Next.js (Turbopack) 2.367s 2.945s 0.578s 31 7.88x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 5.920s (+67.5% 🔺) 7.534s (+45.1% 🔺) 1.614s 13 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.622s (-21.2% 🟢) 1.006s (~) 0.383s 120 1.00x
🐘 Postgres Next.js (Turbopack) 0.926s 1.244s 0.318s 97 1.49x
🐘 Postgres Express 0.935s (+14.1% 🔺) 1.431s (+40.7% 🔺) 0.497s 85 1.50x
💻 Local Express 9.209s (-17.7% 🟢) 9.638s (-19.3% 🟢) 0.430s 13 14.79x
💻 Local Nitro 9.239s (-17.4% 🟢) 9.715s (-16.7% 🟢) 0.476s 13 14.84x
💻 Local Next.js (Turbopack) 10.682s 11.299s 0.617s 11 17.16x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 18.953s (+83.5% 🔺) 20.574s (+67.5% 🔺) 1.621s 6 1.00x
▲ Vercel Express ⚠️ missing - - - -
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.117s (+461.0% 🔺) 2.005s (+99.6% 🔺) 0.010s (-20.7% 🟢) 2.017s (+98.1% 🔺) 0.900s 10 1.00x
💻 Local Nitro 1.119s (+423.9% 🔺) 2.005s (+99.6% 🔺) 0.009s (-27.2% 🟢) 2.016s (+97.9% 🔺) 0.896s 10 1.00x
🐘 Postgres Nitro 1.139s (+455.6% 🔺) 1.996s (+99.6% 🔺) 0.001s (-13.3% 🟢) 2.010s (+98.8% 🔺) 0.871s 10 1.02x
💻 Local Next.js (Turbopack) 1.190s 2.003s 0.010s 2.017s 0.827s 10 1.07x
🐘 Postgres Next.js (Turbopack) 1.195s 2.001s 0.001s 2.010s 0.816s 10 1.07x
🐘 Postgres Express 1.276s (+522.0% 🔺) 1.998s (+100.1% 🔺) 0.003s (+68.8% 🔺) 2.022s (+99.9% 🔺) 0.746s 10 1.14x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.216s (-67.7% 🟢) 3.418s (-60.5% 🟢) 2.066s (+226.9% 🔺) 5.916s (-39.6% 🟢) 3.700s 10 1.00x
▲ Vercel Express ⚠️ missing - - - - -
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.500s (+140.4% 🔺) 2.003s (+99.0% 🔺) 0.004s (-8.1% 🟢) 2.024s (+97.9% 🔺) 0.523s 30 1.00x
💻 Local Nitro 1.526s (+82.0% 🔺) 2.011s (+98.7% 🔺) 0.010s (+5.3% 🔺) 2.023s (+81.3% 🔺) 0.497s 30 1.02x
💻 Local Express 1.675s (+121.3% 🔺) 2.009s (+95.3% 🔺) 0.010s (+2.4%) 2.200s (+111.6% 🔺) 0.525s 28 1.12x
💻 Local Next.js (Turbopack) 1.680s 2.012s 0.010s 2.025s 0.346s 30 1.12x
🐘 Postgres Next.js (Turbopack) 1.696s 2.010s 0.004s 2.024s 0.328s 30 1.13x
🐘 Postgres Express 2.338s (+271.1% 🔺) 2.862s (+184.4% 🔺) 0.003s (-14.2% 🟢) 2.907s (+184.1% 🔺) 0.569s 21 1.56x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 5.898s (-65.1% 🟢) 7.336s (-59.8% 🟢) 0.218s (+3.3%) 7.964s (-57.9% 🟢) 2.065s 8 1.00x
▲ Vercel Express ⚠️ missing - - - - -
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.644s (-33.5% 🟢) 1.029s (-17.5% 🟢) 0.000s (-100.0% 🟢) 1.052s (-16.4% 🟢) 0.408s 58 1.00x
🐘 Postgres Next.js (Turbopack) 0.802s 1.053s 0.000s 1.060s 0.258s 57 1.25x
💻 Local Express 1.305s (+6.6% 🔺) 2.014s (~) 0.000s (~) 2.016s (~) 0.711s 30 2.03x
🐘 Postgres Express 1.316s (+37.0% 🔺) 1.810s (+41.6% 🔺) 0.000s (+178.8% 🔺) 1.878s (+43.8% 🔺) 0.562s 33 2.04x
💻 Local Nitro 1.339s (+9.5% 🔺) 2.014s (~) 0.000s (+166.7% 🔺) 2.016s (~) 0.677s 30 2.08x
💻 Local Next.js (Turbopack) 1.469s 2.015s 0.000s 2.018s 0.550s 30 2.28x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 4.111s (-59.6% 🟢) 5.460s (-52.6% 🟢) 0.001s (+Infinity% 🔺) 5.897s (-51.1% 🟢) 1.787s 11 1.00x
▲ Vercel Express ⚠️ missing - - - - -
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.400s (-21.9% 🟢) 1.995s (-6.8% 🟢) 0.000s (-100.0% 🟢) 2.020s (-7.1% 🟢) 0.620s 30 1.00x
🐘 Postgres Next.js (Turbopack) 1.629s 2.262s 0.000s 2.270s 0.641s 27 1.16x
💻 Local Next.js (Turbopack) 2.997s 3.557s 0.001s 3.562s 0.565s 17 2.14x
💻 Local Express 3.020s (-12.9% 🟢) 3.674s (-8.9% 🟢) 0.000s (-70.6% 🟢) 3.677s (-8.9% 🟢) 0.657s 17 2.16x
💻 Local Nitro 3.069s (-9.4% 🟢) 3.839s (-4.8%) 0.001s (-6.2% 🟢) 3.842s (-4.8%) 0.773s 16 2.19x
🐘 Postgres Express 3.924s (+121.4% 🔺) 4.357s (+100.1% 🔺) 0.000s (NaN%) 4.394s (+99.9% 🔺) 0.471s 14 2.80x

▲ Production (Vercel)

No data available

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 15/21
🐘 Postgres Nitro 21/21
▲ Vercel Next.js (Turbopack) 20/20
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 16/21
Next.js (Turbopack) 🐘 Postgres 14/21
Nitro 🐘 Postgres 16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

⚠️ Community world benchmarks failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Makes deferred workflow discovery (“lazyDiscovery”) the default behavior for withWorkflow on the next branch, updates examples/docs accordingly, and adjusts workbench/e2e expectations to match the new default and warning text.

Changes:

  • Flip withWorkflow’s default workflows.lazyDiscovery behavior to enabled unless explicitly set to false.
  • Remove redundant lazyDiscovery: true overrides from Next.js workbench apps and update tests to validate the new default.
  • Reword the Next.js version fallback warning and update docs and e2e assertions to match.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
workbench/nextjs-webpack/next.config.ts Removes explicit lazyDiscovery: true now that it’s the default.
workbench/nextjs-turbopack/next.config.ts Removes explicit lazyDiscovery: true and keeps config minimal.
packages/next/src/index.ts Implements default-on lazyDiscovery behavior (opt-out with false).
packages/next/src/index.test.ts Adds unit tests asserting default/explicit true/explicit false env-var behavior.
packages/next/src/builder.ts Updates the fallback warning message when Next.js is too old for deferred mode.
packages/core/e2e/local-build.test.ts Updates e2e warning assertion to match the new warning text.
docs/content/docs/api-reference/workflow-next/with-workflow.mdx Updates docs to reflect default true and how to force eager discovery.
.changeset/lazy-discovery-default.md Adds changeset documenting the default change and opt-out.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

expect(process.env.WORKFLOW_NEXT_LAZY_DISCOVERY).toBe('1');
});

it('disables lazyDiscovery when explicitly set to false', async () => {
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

These it(...) blocks are marked async but don't await anything. Consider removing async (or adding awaited behavior if intended) to avoid misleading tests / potential lints about unused promises.

Suggested change
it('disables lazyDiscovery when explicitly set to false', async () => {
it('disables lazyDiscovery when explicitly set to false', () => {

Copilot uses AI. Check for mistakes.
VaguelySerious
VaguelySerious previously approved these changes Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

No backport to stable for 070bd0c (AI decision).

This commit flips the default value of lazyDiscovery to true, which is a behavior change intended for the next major release on main. The PR description explicitly notes that a companion PR (#1804) already handles the stable branch differently — keeping the current default but removing the workbench override — so backporting this commit would conflict with that intentional split.

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

070bd0cea960a0d56d7812a6147455f75a06d859

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants