Skip to content

[world-local] Reduce sequential replay I/O#2152

Open
pranaygp wants to merge 3 commits into
mainfrom
pranaygp/codex/world-local-sequential-perf
Open

[world-local] Reduce sequential replay I/O#2152
pranaygp wants to merge 3 commits into
mainfrom
pranaygp/codex/world-local-sequential-perf

Conversation

@pranaygp
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp commented May 29, 2026

Summary

  • cache a bounded recent window of append-only local events so immediate replay pagination avoids rereading JSON files
  • cache storage directories created by this process so sequential event writes avoid repeated recursive mkdir syscalls
  • preserve correctness under relative data directories, mutation, cleanup, and long-lived active runs with focused regression coverage and a patch changeset

Root cause

The existing sequentialStepsWorkflow(count, 0) benchmark reproduces the zero-work sequential-step shape. On current main, its local-world storage work is dominated by three persisted lifecycle events per step and the incremental events.list() call used for replay. The listing path rereads append-only event files that the same storage instance just wrote, while the write path repeatedly calls mkdir(..., { recursive: true }) for fixed directories.

This workload does not exercise streams; the previously landed stream metadata optimization is separate from this path.

Correctness and memory safeguards

Reviewing the caching implementation exposed three correctness issues that are covered here:

  • cached event lookup now resolves relative data directories before using the absolute-path cache key, so the ordinary local-world configuration receives the optimization
  • cached event entries are decoded from the serialized snapshot through EventSchema, so they are detached from caller mutations and have the same normalized shape as disk reads
  • atomic and exclusive writes retry once after recreating a cached directory removed externally while a dev server is still running

Retention is explicitly bounded:

  • the recent-event cache is capped at 4 MiB and 1000 entries across active runs; oversized events are read from disk instead of retained
  • cached events are released for terminal runs and when world.clear() or world.close() is called
  • tests exercise eviction after exceeding the byte limit and correlation-id cache queries

Measurement

I modeled the event/replay lifecycle for a no-delay sequential workflow directly through @workflow/world-local storage with a relative dataDir, matching normal local-world configuration. Both revisions ran the same probe with one warmup and five measured trials per size; medians are reported. The control is the PR merge base (ae37315cb).

Sequential steps Merge base This branch Improvement
50 178.49 ms 124.97 ms 30.0% faster
200 742.24 ms 609.04 ms 17.9% faster

For 200 steps, incremental events.list() time fell from 193.35 ms to 104.86 ms (45.8% lower).

A 50-step filesystem-operation trace demonstrates the removed work:

Operation Merge-base calls This branch calls
readFile 457 252
mkdir 404 4

An end-to-end workbench probe also showed that most remaining no-delay sequential-workflow latency occurs above this storage path: a 200-step run reported 22.8 s inside /.well-known/workflow/v1/flow.

Validation

  • reproduced and fixed relative-dataDir cache misses; a five-step sequential lifecycle regression test now verifies repeated event lists make zero event-file reads
  • reproduced the pre-fix cached-object alias and verified the amended implementation returns the persisted value
  • reproduced the pre-fix external-directory cleanup failure (ENOENT on the next event write) and verified directory recovery
  • added cache-hit coverage for listByCorrelationId() and FIFO byte-limit eviction without a Windows-hostile high-file-count test
  • pnpm --filter @workflow/world-local typecheck
  • pnpm --filter @workflow/world-local test (378 tests passed)
  • pnpm --filter '@workflow/world-local...' build
  • pnpm changeset status --since=origin-https/main
  • git diff --check

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

🦋 Changeset detected

Latest commit: f9c47da

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

This PR includes changesets to release 18 packages
Name Type
@workflow/world-local Patch
@workflow/cli Patch
@workflow/core Patch
@workflow/vitest Patch
@workflow/world-postgres Patch
workflow Patch
@workflow/world-testing Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro 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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 29, 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 29, 2026 10:36pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 29, 2026 10:36pm
example-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-astro-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-express-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-fastify-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-hono-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-nitro-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-nuxt-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-sveltekit-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workbench-vite-workflow Ready Ready Preview, Comment May 29, 2026 10:36pm
workflow-docs Ready Ready Preview, Comment, Open in v0 May 29, 2026 10:36pm
workflow-swc-playground Ready Ready Preview, Comment May 29, 2026 10:36pm
workflow-tarballs Ready Ready Preview, Comment May 29, 2026 10:36pm
workflow-web Ready Ready Preview, Comment May 29, 2026 10:36pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 1254 1 219 1474
✅ 💻 Local Development 1657 0 219 1876
✅ 📦 Local Production 1657 0 219 1876
✅ 🐘 Local Postgres 1657 0 219 1876
✅ 📋 Other 762 0 176 938
Total 6987 1 1052 8040

❌ Failed Tests

▲ Vercel Production (1 failed)

nuxt (1 failed):

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 108 0 26
✅ example 108 0 26
✅ express 108 0 26
✅ fastify 108 0 26
✅ hono 108 0 26
✅ nextjs-turbopack 132 0 2
✅ nextjs-webpack 132 0 2
✅ nitro 108 0 26
❌ nuxt 107 1 26
✅ sveltekit 127 0 7
✅ vite 108 0 26
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 109 0 25
✅ express-stable 109 0 25
✅ fastify-stable 109 0 25
✅ hono-stable 109 0 25
✅ nextjs-turbopack-canary 115 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 134 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 134 0 0
✅ nextjs-webpack-canary 115 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 134 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 134 0 0
✅ nitro-stable 109 0 25
✅ nuxt-stable 109 0 25
✅ sveltekit-stable 128 0 6
✅ vite-stable 109 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 109 0 25
✅ express-stable 109 0 25
✅ fastify-stable 109 0 25
✅ hono-stable 109 0 25
✅ nextjs-turbopack-canary 115 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 134 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 134 0 0
✅ nextjs-webpack-canary 115 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 134 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 134 0 0
✅ nitro-stable 109 0 25
✅ nuxt-stable 109 0 25
✅ sveltekit-stable 128 0 6
✅ vite-stable 109 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 109 0 25
✅ express-stable 109 0 25
✅ fastify-stable 109 0 25
✅ hono-stable 109 0 25
✅ nextjs-turbopack-canary 115 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 134 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 134 0 0
✅ nextjs-webpack-canary 115 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 134 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 134 0 0
✅ nitro-stable 109 0 25
✅ nuxt-stable 109 0 25
✅ sveltekit-stable 128 0 6
✅ vite-stable 109 0 25
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 109 0 25
✅ e2e-local-dev-tanstack-start- 109 0 25
✅ e2e-local-postgres-nest-stable 109 0 25
✅ e2e-local-postgres-tanstack-start- 109 0 25
✅ e2e-local-prod-nest-stable 109 0 25
✅ e2e-local-prod-tanstack-start- 109 0 25
✅ e2e-vercel-prod-tanstack-start 108 0 26

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 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.041s (-6.8% 🟢) 1.005s (~) 0.964s 10 1.00x
💻 Local Nitro 0.042s (-1.6%) 1.007s (~) 0.964s 10 1.03x
🐘 Postgres Nitro 0.058s (-39.2% 🟢) 1.014s (-2.8%) 0.956s 10 1.40x
🐘 Postgres Express 0.059s (+2.6%) 1.014s (~) 0.954s 10 1.44x
💻 Local Next.js (Turbopack) 0.064s 1.006s 0.942s 10 1.55x
🐘 Postgres Next.js (Turbopack) 0.068s 1.012s 0.944s 10 1.64x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.255s (+1.2%) 2.438s (+4.5%) 2.184s 10 1.00x
▲ Vercel Express 0.267s (+13.5% 🔺) 2.194s (+2.7%) 1.927s 10 1.05x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.086s (-4.0%) 2.006s (~) 0.920s 10 1.00x
💻 Local Express 1.096s (-2.6%) 2.007s (~) 0.911s 10 1.01x
🐘 Postgres Nitro 1.108s (-2.8%) 2.011s (~) 0.903s 10 1.02x
🐘 Postgres Express 1.114s (-2.8%) 2.010s (~) 0.896s 10 1.03x
💻 Local Next.js (Turbopack) 1.131s 2.007s 0.876s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.135s 2.009s 0.874s 10 1.05x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 1.601s (-21.3% 🟢) 3.502s (-8.6% 🟢) 1.901s 10 1.00x
▲ Vercel Express 1.759s (-6.2% 🟢) 3.349s (-12.1% 🟢) 1.590s 10 1.10x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.513s (-4.0%) 11.023s (~) 0.509s 3 1.00x
💻 Local Express 10.514s (-3.7%) 11.023s (~) 0.509s 3 1.00x
🐘 Postgres Nitro 10.523s (-3.2%) 11.019s (~) 0.496s 3 1.00x
🐘 Postgres Express 10.611s (-3.2%) 11.017s (~) 0.406s 3 1.01x
💻 Local Next.js (Turbopack) 10.794s 11.024s 0.229s 3 1.03x
🐘 Postgres Next.js (Turbopack) 10.931s 11.351s 0.421s 3 1.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 13.381s (-21.2% 🟢) 14.736s (-26.4% 🟢) 1.356s 3 1.00x
▲ Vercel Next.js (Turbopack) 13.741s (-20.7% 🟢) 15.292s (-21.2% 🟢) 1.551s 2 1.03x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 13.726s (-8.3% 🟢) 14.028s (-6.7% 🟢) 0.301s 5 1.00x
💻 Local Nitro 13.739s (-8.8% 🟢) 14.027s (-12.5% 🟢) 0.288s 5 1.00x
🐘 Postgres Nitro 13.767s (-5.7% 🟢) 14.021s (-6.7% 🟢) 0.254s 5 1.00x
🐘 Postgres Express 13.805s (-5.3% 🟢) 14.022s (-6.7% 🟢) 0.216s 5 1.01x
💻 Local Next.js (Turbopack) 14.408s 15.030s 0.622s 4 1.05x
🐘 Postgres Next.js (Turbopack) 14.500s 15.018s 0.517s 4 1.06x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 21.802s (-58.5% 🟢) 23.661s (-56.7% 🟢) 1.859s 3 1.00x
▲ Vercel Express 22.268s (-55.7% 🟢) 23.745s (-54.8% 🟢) 1.477s 3 1.02x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 12.390s (-11.3% 🟢) 13.017s (-9.0% 🟢) 0.627s 7 1.00x
💻 Local Nitro 12.455s (-25.8% 🟢) 13.025s (-23.5% 🟢) 0.570s 7 1.01x
💻 Local Express 12.480s (-24.8% 🟢) 13.025s (-23.5% 🟢) 0.545s 7 1.01x
🐘 Postgres Express 12.607s (-10.0% 🟢) 13.023s (-10.8% 🟢) 0.416s 7 1.02x
💻 Local Next.js (Turbopack) 13.595s 14.027s 0.432s 7 1.10x
🐘 Postgres Next.js (Turbopack) 13.728s 14.020s 0.292s 7 1.11x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 31.017s (-92.1% 🟢) 32.676s (-91.7% 🟢) 1.659s 3 1.00x
▲ Vercel Express 31.192s (-74.3% 🟢) 32.931s (-73.4% 🟢) 1.739s 3 1.01x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.180s (-7.4% 🟢) 2.007s (~) 0.828s 15 1.00x
🐘 Postgres Express 1.181s (-6.3% 🟢) 2.007s (~) 0.826s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.234s 2.008s 0.773s 15 1.05x
💻 Local Next.js (Turbopack) 1.489s 2.006s 0.516s 15 1.26x
💻 Local Express 1.513s (+1.6%) 2.006s (~) 0.493s 15 1.28x
💻 Local Nitro 1.552s (-4.9%) 2.007s (-3.2%) 0.455s 15 1.32x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.610s (-8.7% 🟢) 4.165s (-9.9% 🟢) 1.554s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.780s (-18.2% 🟢) 4.298s (-12.9% 🟢) 1.517s 7 1.07x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.259s (-46.4% 🟢) 2.008s (-33.3% 🟢) 0.748s 15 1.00x
🐘 Postgres Express 1.286s (-45.5% 🟢) 2.008s (-33.3% 🟢) 0.721s 15 1.02x
🐘 Postgres Next.js (Turbopack) 1.361s 2.006s 0.645s 15 1.08x
💻 Local Next.js (Turbopack) 2.420s 3.008s 0.588s 10 1.92x
💻 Local Express 2.466s (-16.5% 🟢) 3.008s (-12.9% 🟢) 0.542s 10 1.96x
💻 Local Nitro 2.526s (-19.7% 🟢) 3.009s (-22.5% 🟢) 0.484s 10 2.01x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.055s (+12.0% 🔺) 5.624s (+10.1% 🔺) 1.570s 6 1.00x
▲ Vercel Next.js (Turbopack) 4.478s (-36.9% 🟢) 5.835s (-34.5% 🟢) 1.357s 6 1.10x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.405s (-59.6% 🟢) 2.007s (-49.9% 🟢) 0.602s 15 1.00x
🐘 Postgres Express 1.414s (-59.4% 🟢) 2.008s (-49.9% 🟢) 0.593s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.722s 2.076s 0.355s 15 1.23x
💻 Local Express 4.388s (-47.4% 🟢) 5.513s (-38.9% 🟢) 1.125s 6 3.12x
💻 Local Nitro 5.205s (-37.7% 🟢) 6.014s (-33.3% 🟢) 0.809s 5 3.70x
💻 Local Next.js (Turbopack) 5.478s 6.012s 0.535s 5 3.90x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.054s (+19.2% 🔺) 6.835s (+11.6% 🔺) 1.781s 5 1.00x
▲ Vercel Next.js (Turbopack) 5.827s (-34.6% 🟢) 7.540s (-31.2% 🟢) 1.713s 5 1.15x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.185s (-5.7% 🟢) 2.009s (~) 0.824s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.223s 2.008s 0.785s 15 1.03x
🐘 Postgres Express 1.227s (-2.4%) 2.010s (~) 0.783s 15 1.04x
💻 Local Next.js (Turbopack) 1.502s 2.007s 0.505s 15 1.27x
💻 Local Express 1.938s (+2.4%) 2.392s (+1.2%) 0.453s 13 1.64x
💻 Local Nitro 1.939s (+4.0%) 2.392s (+2.2%) 0.452s 13 1.64x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.600s (+0.7%) 4.050s (-6.9% 🟢) 1.450s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.776s (-5.3% 🟢) 4.491s (-3.3%) 1.715s 7 1.07x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.245s (-46.8% 🟢) 2.007s (-33.3% 🟢) 0.762s 15 1.00x
🐘 Postgres Express 1.270s (-45.8% 🟢) 2.008s (-33.3% 🟢) 0.738s 15 1.02x
🐘 Postgres Next.js (Turbopack) 1.355s 2.009s 0.655s 15 1.09x
💻 Local Next.js (Turbopack) 2.684s 3.210s 0.526s 10 2.15x
💻 Local Nitro 2.684s (-12.4% 🟢) 3.009s (-22.6% 🟢) 0.324s 10 2.16x
💻 Local Express 2.702s (-13.7% 🟢) 3.109s (-17.4% 🟢) 0.407s 10 2.17x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.696s (+17.6% 🔺) 5.366s (+18.7% 🔺) 1.669s 6 1.00x
▲ Vercel Express 3.867s (+21.1% 🔺) 5.806s (+21.1% 🔺) 1.939s 6 1.05x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.372s (-60.6% 🟢) 2.009s (-49.9% 🟢) 0.637s 15 1.00x
🐘 Postgres Express 1.413s (-59.6% 🟢) 2.008s (-49.9% 🟢) 0.596s 15 1.03x
🐘 Postgres Next.js (Turbopack) 1.646s 2.075s 0.429s 15 1.20x
💻 Local Next.js (Turbopack) 5.349s 6.614s 1.265s 5 3.90x
💻 Local Nitro 5.537s (-39.4% 🟢) 6.213s (-38.0% 🟢) 0.676s 5 4.04x
💻 Local Express 5.917s (-32.8% 🟢) 6.414s (-30.8% 🟢) 0.497s 5 4.31x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.836s (-24.6% 🟢) 6.632s (-18.9% 🟢) 1.796s 5 1.00x
▲ Vercel Next.js (Turbopack) 5.575s (-17.5% 🟢) 7.106s (-16.8% 🟢) 1.530s 5 1.15x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.586s (-28.6% 🟢) 1.042s (+3.5%) 0.456s 58 1.00x
💻 Local Express 0.592s (-39.8% 🟢) 1.005s (-6.6% 🟢) 0.412s 60 1.01x
🐘 Postgres Express 0.593s (-29.3% 🟢) 1.007s (-1.6%) 0.414s 60 1.01x
💻 Local Nitro 0.603s (-38.5% 🟢) 1.005s (-8.1% 🟢) 0.402s 60 1.03x
🐘 Postgres Next.js (Turbopack) 0.831s 1.041s 0.210s 58 1.42x
💻 Local Next.js (Turbopack) 0.848s 1.039s 0.191s 58 1.45x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.311s (-72.1% 🟢) 6.779s (-68.2% 🟢) 1.468s 10 1.00x
▲ Vercel Next.js (Turbopack) 5.435s (-62.5% 🟢) 7.217s (-55.1% 🟢) 1.782s 9 1.02x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | 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.391s (-27.8% 🟢) 2.053s (-2.3%) 0.662s 44 1.00x
🐘 Postgres Express 1.412s (-28.6% 🟢) 2.030s (-10.1% 🟢) 0.618s 45 1.01x
💻 Local Express 1.480s (-50.9% 🟢) 2.006s (-44.1% 🟢) 0.526s 45 1.06x
💻 Local Nitro 1.516s (-50.1% 🟢) 2.006s (-46.6% 🟢) 0.490s 45 1.09x
🐘 Postgres Next.js (Turbopack) 1.937s 2.124s 0.187s 43 1.39x
💻 Local Next.js (Turbopack) 2.080s 2.910s 0.830s 31 1.49x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 13.107s (-73.7% 🟢) 15.253s (-70.5% 🟢) 2.146s 6 1.00x
▲ Vercel Express 13.868s (-59.8% 🟢) 15.531s (-57.8% 🟢) 1.663s 6 1.06x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.714s (-33.9% 🟢) 3.137s (-31.9% 🟢) 0.423s 39 1.00x
🐘 Postgres Express 2.766s (-30.7% 🟢) 3.137s (-28.2% 🟢) 0.371s 39 1.02x
💻 Local Express 3.168s (-65.6% 🟢) 3.976s (-60.3% 🟢) 0.808s 31 1.17x
💻 Local Nitro 3.215s (-65.4% 🟢) 4.009s (-60.0% 🟢) 0.794s 30 1.18x
🐘 Postgres Next.js (Turbopack) 3.732s 4.008s 0.276s 30 1.37x
💻 Local Next.js (Turbopack) 4.312s 5.012s 0.700s 24 1.59x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 26.288s (-79.8% 🟢) 28.781s (-78.2% 🟢) 2.494s 5 1.00x
▲ Vercel Next.js (Turbopack) 27.475s (-74.4% 🟢) 29.692s (-72.7% 🟢) 2.217s 5 1.05x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | 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.216s (-23.9% 🟢) 1.006s (~) 0.791s 60 1.00x
🐘 Postgres Express 0.226s (-20.1% 🟢) 1.006s (~) 0.780s 60 1.05x
🐘 Postgres Next.js (Turbopack) 0.262s 1.006s 0.744s 60 1.21x
💻 Local Next.js (Turbopack) 0.678s 1.021s 0.343s 59 3.14x
💻 Local Nitro 0.684s (+13.1% 🔺) 1.004s (-1.7%) 0.320s 60 3.17x
💻 Local Express 0.780s (+39.2% 🔺) 1.021s (+1.7%) 0.241s 59 3.62x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.097s (+7.3% 🔺) 3.671s (+0.9%) 1.573s 17 1.00x
▲ Vercel Next.js (Turbopack) 2.696s (+33.3% 🔺) 4.128s (+8.8% 🔺) 1.432s 15 1.29x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Express | 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.347s (-30.1% 🟢) 1.007s (~) 0.660s 90 1.00x
🐘 Postgres Express 0.374s (-26.7% 🟢) 1.007s (~) 0.633s 90 1.08x
🐘 Postgres Next.js (Turbopack) 0.469s 1.006s 0.537s 90 1.35x
💻 Local Next.js (Turbopack) 2.765s 3.108s 0.344s 30 7.97x
💻 Local Nitro 2.766s (+9.0% 🔺) 3.042s (+1.1%) 0.276s 30 7.98x
💻 Local Express 2.849s (+13.4% 🔺) 3.112s (+3.4%) 0.263s 29 8.22x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 5.552s (+57.0% 🔺) 7.291s (+40.4% 🔺) 1.740s 13 1.00x
▲ Vercel Express 5.865s (+92.5% 🔺) 7.244s (+50.7% 🔺) 1.378s 13 1.06x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.674s (-14.7% 🟢) 1.007s (~) 0.333s 120 1.00x
🐘 Postgres Express 0.711s (-13.2% 🟢) 1.006s (-1.1%) 0.296s 120 1.05x
🐘 Postgres Next.js (Turbopack) 0.933s 1.312s 0.379s 92 1.38x
💻 Local Express 6.514s (-41.8% 🟢) 7.195s (-39.7% 🟢) 0.681s 17 9.66x
💻 Local Nitro 6.535s (-41.6% 🟢) 7.195s (-38.3% 🟢) 0.661s 17 9.69x
💻 Local Next.js (Turbopack) 6.947s 7.833s 0.886s 16 10.31x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 12.085s (+17.0% 🔺) 13.782s (+12.2% 🔺) 1.697s 9 1.00x
▲ Vercel Express 14.261s (+92.2% 🔺) 15.643s (+69.2% 🔺) 1.381s 8 1.18x
▲ Vercel Nitro ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Express

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.155s (+480.3% 🔺) 2.005s (+99.6% 🔺) 0.009s (-24.8% 🟢) 2.016s (+98.1% 🔺) 0.861s 10 1.00x
🐘 Postgres Nitro 1.162s (+466.9% 🔺) 2.001s (+100.2% 🔺) 0.001s (-20.0% 🟢) 2.011s (+98.8% 🔺) 0.848s 10 1.01x
💻 Local Nitro 1.163s (+444.2% 🔺) 2.005s (+99.6% 🔺) 0.013s (~) 2.020s (+98.3% 🔺) 0.857s 10 1.01x
🐘 Postgres Express 1.179s (+474.9% 🔺) 2.001s (+100.3% 🔺) 0.001s (-25.0% 🟢) 2.012s (+98.9% 🔺) 0.832s 10 1.02x
💻 Local Next.js (Turbopack) 1.205s 2.003s 0.012s 2.019s 0.814s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.219s 2.000s 0.001s 2.010s 0.791s 10 1.06x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.321s (-7.3% 🟢) 3.265s (-20.2% 🟢) 1.657s (+72.5% 🔺) 5.327s (-4.7%) 3.006s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.511s (-63.4% 🟢) 3.509s (-59.4% 🟢) 13.390s (+2019.0% 🔺) 17.336s (+77.1% 🔺) 14.825s 10 1.08x
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Express | 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.579s (+152.9% 🔺) 2.001s (+98.8% 🔺) 0.004s (-3.3%) 2.026s (+98.1% 🔺) 0.447s 30 1.00x
🐘 Postgres Express 1.619s (+156.9% 🔺) 2.005s (+99.2% 🔺) 0.004s (+2.7%) 2.025s (+98.0% 🔺) 0.407s 30 1.03x
🐘 Postgres Next.js (Turbopack) 1.724s 2.011s 0.004s 2.026s 0.302s 30 1.09x
💻 Local Next.js (Turbopack) 1.730s 2.009s 0.010s 2.022s 0.292s 30 1.10x
💻 Local Express 1.776s (+134.6% 🔺) 2.011s (+95.4% 🔺) 0.011s (+15.3% 🔺) 2.202s (+111.8% 🔺) 0.426s 28 1.12x
💻 Local Nitro 2.003s (+138.8% 🔺) 2.009s (+98.5% 🔺) 0.010s (+6.7% 🔺) 2.421s (+117.0% 🔺) 0.418s 25 1.27x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 6.079s (-6.5% 🟢) 7.259s (-9.4% 🟢) 0.243s (-40.6% 🟢) 7.953s (-10.0% 🟢) 1.874s 8 1.00x
▲ Vercel Next.js (Turbopack) 6.325s (-62.6% 🟢) 7.667s (-58.0% 🟢) 0.237s (+12.3% 🔺) 8.398s (-55.6% 🟢) 2.073s 8 1.04x
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Express | 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.682s (-29.6% 🟢) 1.033s (-17.2% 🟢) 0.000s (+65.5% 🔺) 1.048s (-16.6% 🟢) 0.366s 58 1.00x
🐘 Postgres Express 0.712s (-26.0% 🟢) 1.031s (-19.3% 🟢) 0.000s (+19.0% 🔺) 1.042s (-20.2% 🟢) 0.330s 58 1.04x
🐘 Postgres Next.js (Turbopack) 0.836s 1.127s 0.000s 1.144s 0.308s 55 1.22x
💻 Local Nitro 1.163s (-4.9%) 2.013s (~) 0.000s (+300.0% 🔺) 2.015s (~) 0.852s 30 1.70x
💻 Local Next.js (Turbopack) 1.282s 1.980s 0.000s 1.983s 0.700s 31 1.88x
💻 Local Express 1.346s (+9.9% 🔺) 1.976s (-2.2%) 0.000s (+39.3% 🔺) 2.157s (+6.7% 🔺) 0.811s 28 1.97x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.652s (-2.4%) 4.624s (-9.4% 🟢) 0.000s (-8.3% 🟢) 5.083s (-8.1% 🟢) 1.431s 12 1.00x
▲ Vercel Next.js (Turbopack) 3.914s (-61.6% 🟢) 4.950s (-57.0% 🟢) 0.001s (+Infinity% 🔺) 5.379s (-55.4% 🟢) 1.465s 12 1.07x
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Express | 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 🥇 Express 1.459s (-17.7% 🟢) 2.143s (-1.6%) 0.000s (+Infinity% 🔺) 2.154s (-2.0%) 0.695s 28 1.00x
🐘 Postgres Nitro 1.520s (-15.1% 🟢) 2.106s (-1.7%) 0.000s (~) 2.175s (~) 0.655s 28 1.04x
🐘 Postgres Next.js (Turbopack) 1.732s 2.224s 0.000s 2.232s 0.501s 27 1.19x
💻 Local Express 2.664s (-23.2% 🟢) 3.023s (-25.1% 🟢) 0.001s (+12.5% 🔺) 3.026s (-25.0% 🟢) 0.362s 20 1.83x
💻 Local Next.js (Turbopack) 2.834s 3.074s 0.000s 3.077s 0.243s 20 1.94x
💻 Local Nitro 2.994s (-11.6% 🟢) 3.080s (-23.6% 🟢) 0.001s (+35.4% 🔺) 3.361s (-16.7% 🟢) 0.366s 18 2.05x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.416s (+18.1% 🔺) 6.703s (+11.3% 🔺) 0.000s (+Infinity% 🔺) 7.140s (+10.6% 🔺) 1.724s 9 1.00x
▲ Vercel Next.js (Turbopack) 44.517s (+692.6% 🔺) 46.095s (+560.2% 🔺) 0.004s (+3300.0% 🔺) 46.655s (+518.8% 🔺) 2.137s 8 8.22x
▲ Vercel Nitro ⚠️ missing - - - - -

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 9/21
🐘 Postgres Nitro 20/21
▲ Vercel Express 13/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Comment thread packages/world-local/src/storage/events-storage.ts
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