Skip to content

refactor: simplify Effect server architecture#101

Draft
ScriptedAlchemy wants to merge 194 commits into
mainfrom
codex/effect-server-architecture
Draft

refactor: simplify Effect server architecture#101
ScriptedAlchemy wants to merge 194 commits into
mainfrom
codex/effect-server-architecture

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Create one scoped Effect ManagedRuntime per plugin setup.
  • Let the runtime own parent-side transform workers, route watchers, delayed prewarm work, resource finalizers, and background fibers.
  • Keep worker execution, browser/runtime templates, generated client code, and synchronous Rsbuild state machines Effect-free.
  • Compose Node-side config, manifest, prerender, typegen, and resource workflows with Effect where it removes Promise/cleanup coordination.
  • Update Effect to 3.22.0 and Rstest to 0.11.4 with per-file isolation enabled.
  • Merge current main, including preservation of in-memory dev output and explicit writeToDisk overrides.

Maintainability

  • One runtime creation site and one ordered, idempotent disposal policy.
  • Native Scope and FiberSet replace duplicate worker/watcher/prewarm close registration and manual cleanup aggregation.
  • Production src/ is 94 lines smaller than the exact pre-Effect baseline.
  • Additional branch lines are regression tests and benchmark infrastructure; total LOC is diagnostic, not a gate.

Validation

  • pnpm test — 58 files, 670 tests passed; includes all TypeScript project checks.
  • pnpm build
  • pnpm test:package-interop
  • Emitted worker and browser/template entries contain no Effect imports or runtime references.
  • Prior fixed-SHA CI: unit/build/publint, 721-test React Router ecosystem suite, E2E, CodeQL, and package preview passed.

Performance

Paired CI compared Effect head d005c48 with the exact pre-Effect baseline 8fdee93 on the same runners:

  • All dev fixtures: wall -2.2%, readiness -2.0%, update/HMR -4.8%.
  • Large dev fixture: wall -2.9%, readiness -3.5%, update/HMR -4.5%.
  • Complex app: cold -0.8%, warm -1.4%, dev +0.4%; all within measured noise.
  • Production builds ranged from -2.3% to +0.1%, except the large fixture at +2.7% inside a ±3.6% noise band (inconclusive, not a detected regression).
  • Effect is absent from the worker entrypoint, so worker startup does not load an Effect runtime.

Exact-baseline benchmark: https://github.com/rstackjs/rsbuild-plugin-react-router/actions/runs/29807014498

ScriptedAlchemy and others added 30 commits July 2, 2026 23:14
…typing

- one resolveAppPackagePath/getPackageVersion pair in plugin-utils
  (react-router version now resolved from the app, not the plugin install)
- extract createRouteManifestItem from the dev-manifest effect and
  collapse the per-chunk module lookups
- replace Awaited<ReturnType<...>>/Parameters<...>[5] gymnastics with
  the exported ReactRouterManifestForDev/RouteChunkManifestOptions types
- type modePlan webOutput/webOptimization with Rspack config types and
  drop the as-const noise
- dedupe classic server-build options, single rsc-option normalization,
  inline single-use query helpers, remove plugin factory indirection

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Transformed routes import UNSAFE_withComponentProps and friends from
react-router, which only exist from 7.7.0; 7.13 is the lowest v7 line
this plugin is tested against (main's previous floor). Widening the
peer range to ^7.0.0 let 7.0-7.12 installs pass peer resolution and
then fail every classic-mode build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Register the RSC request listener via the server.setup post-callback so
it runs after compiled-asset and public-dir middlewares, making it the
fallback for anything static serving declines - the same routing
semantics as production. This removes the GET/POST and file-extension
bypass heuristics that 404'd extension-ful resource routes (e.g.
/sitemap.xml) and non-GET/POST resource routes in dev; only /__rsbuild_
internals bypass the handler now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wire the prerender config into the RSC mode plan and add an
onAfterBuild step that replays upstream's RSC prerender pipeline
against the built server bundle's fetch handler: emits
<path>/index.html plus <path>.rsc flight payloads (_.rsc for the
root), meta-refresh documents for redirects, raw bytes for resource
routes, and __spa-fallback.html/.rsc for ssr:false builds. The RSC
preview fixture now serves prerendered documents and the SPA fallback
like upstream's configurePreviewServer. Classic-mode prerender is
untouched.

Vendored parity tests rsc/rsc-prerender-test.ts now pass 3/3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
createReactRouterModePlan is now a thin dispatcher over
createClassicModePlan / createRscModePlan with a narrow shared
ModePlanContext, so each mode's planner owns only the inputs it uses
instead of one 30-field options blob feeding both branches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The sync script now carries a pinned upstream ref
(4cf6e62d0cdf9d7f6e09b0ea10077d7fb0e1b438), refuses to sync from a
dirty or mismatched source checkout (--update-pin adopts a new sha),
and writes tests/react-router-framework/UPSTREAM.json recording the
repository, sha, source dirs, file count, and adapter-owned overlay
list. The README documents the pin-update flow and that everything
outside the adapter-owned files is generated and must not be
hand-edited.

corpusVerified is false: 13 checked-in files drift from the pinned
sha (a locally added rsc-framework-test.ts plus Rsbuild adaptations
and small edits) - recorded in the manifest as an undeclared overlay
to classify in a follow-up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The corpus is repo-owned and rsbuild-adapted; UPSTREAM.json records
provenance only. Delete the five checked-in template vite.config.ts
files (the adapter generates rsbuild.config.ts and never reads them)
and strip vite/@vitejs/@vanilla-extract/vite-plugin/@cloudflare/
vite-plugin/vite-tsconfig-paths entries from corpus package.jsons
(never installed - the corpus is not a workspace package and the
adapter rewrites fixture deps wholesale). No test file imports 'vite'
at top level; remaining matches are fixture template strings the
adapter converts. vite-env-only stays: fixture app code imports its
macros.

Verified: playwright smoke 7/7, test:core 490/490.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
RSC mode silently ignored buildEnd, presets, serverBundles, and
subResourceIntegrity from react-router.config - a user's buildEnd hook
never fired and serverBundles/SRI produced nothing with no signal.
Upstream's RSC vite plugin rejects these with a validation error;
assertReactRouterRscConfigSupport now does the same.

allowedActionOrigins was also dropped in RSC mode even though
react-router's matchRSCServerRequest supports it (upstream's default
RSC entry drops it too). Expose it as a
virtual/react-router/unstable_rsc/allowed-action-origins module and
pass it through the entry template so action-origin restrictions apply.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The RSC mode plan pinned routeChunkConfig.splitRouteModules to false,
so a configured 'enforce' never triggered chunk validation. Upstream's
RSC vite plugin gates validation on config.splitRouteModules ===
'enforce' while chunk splitting itself stays content-detected - pass
the resolved config value through to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The config factory in integration/helpers/vite.ts now emits
rsbuild.config.ts content (pluginReactRouter/pluginReactRouterRSC +
pluginReact, pluginMdx when needed) with real option mappings:
base->output.assetPrefix, port->server.port+strictPort,
assetsInlineLimit->output.dataUriLimit, assetsDir->output.distPath,
vanilla-extract via @vanilla-extract/webpack-plugin (deterministic
identifiers, realContentHash off, sideEffects workaround). ~35 inline
vite.config fixture strings converted across 20+ test files; Vite-only
suites (plugin-order validation, @cloudflare/vite-plugin, fs.allow)
carry visible describe/test.skip with reasons. The vite-7/vite-8
template pair is collapsed to one (identical under rsbuild), halving
template-parameterized suite runs. The adapter's vite.config
interception is now a warn-loudly dead path (0 hits across all runs).

Verified against captured baselines: no test that passed before fails
after; vite-manifests (3), server-bundles dev/build-manifest,
spa-mode manifest, and vanilla-extract no-JS suites (3) newly pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Route edits in classic dev now apply through react-refresh instead of
full reloads, and loader/action changes trigger client revalidation:

- src/dev-hmr.ts: resolves @rsbuild/plugin-react's react-refresh
  runtime, generates a dev-only HMR runtime virtual module, and
  maintains an HDR revision module that the dev runtime bumps when a
  node rebuild commits so the browser revalidates loader data.
- route transforms gain a devHmr mode wrapping client route modules
  with refresh registration; dev-runtime-controller patches route
  metadata on the client and signals rebuild commits instead of
  forcing full reloads.
- When the react-refresh runtime is absent (or in RSC/build mode),
  everything falls back to the previous full-reload behavior.

Vendored parity tests vite-hmr-hdr-test.ts now pass 3/3 (previously
0/6 pre-template-collapse). vite-dev-test.ts guard: 12 passed, 4
pre-existing failures verified identical without this change.

This work was implemented by a subagent whose worktree was lost to a
session limit; the change set was recovered by replaying its recorded
54 edit operations and validated byte-for-byte against its partial
snapshot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The helper spawnSyncs 'rsbuild dev' expecting Vite's validate-and-exit
startup behavior; rsbuild's dev server never self-terminates, which
blocked a suite run indefinitely when a test assumed an error exit.
Triage confirmed no plugin or rsbuild bug (config function-form was
coincidental): a 30s timeout keeps any such assumption from hanging
the harness again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two manifest asset-URL bugs:

- The dev manifest derived its asset prefix solely from
  output.assetPrefix, ignoring dev.assetPrefix (Rsbuild's effective
  prefix in dev, defaulted from server.base). Asset URLs 404'd for any
  app configuring a dev prefix. resolveEffectiveAssetPrefix now mirrors
  Rsbuild's per-mode precedence off the normalized config, resolved in
  onBeforeCreateCompiler.

- The build-mode browser manifest was generated at processAssets stage
  'additions' (-100), before rspack's realContentHash rename at
  OPTIMIZE_HASH (2500), so manifest CSS/JS URLs could reference
  pre-rename hashed names absent from the output. Build-mode manifest
  generation and emission now run at 'report' (5000), unifying the
  previously separate SRI deferral; dev keeps 'additions' (no
  realContentHash pass in dev).

test:core 491 -> 499. Classic-mode basename dev/build corpus cases all
pass; vanilla-extract build cases pass with the fixtures'
realContentHash:false workaround removed (workaround removal lands
with the corpus rename commit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Content-level renames completing the file renames that landed with
fb25f5a: viteConfig->rsbuildConfig (77 refs), vitePreview->
rsbuildPreview, viteDevCmd->rsbuildDevCmd, viteMajorTemplates->
bundlerTemplates, Rsbuild-accurate describe/test titles ('Vite CSS'->
'CSS', 'vite dev'->'rsbuild dev', ...), rsc fixture package scripts
now say rsbuild, and UPSTREAM.json gains a complete upstream->corpus
renames map (31 entries) so manual upstream comparison survives the
renames. The two describe.skip'ed Vite-only suites keep their accurate
Vite titles, as do assertions on strings React Router itself emits.

Also applies the deferred manifest-fix corpus hunk to the renamed
config factory: 'base' now maps to dev.assetPrefix as well (the plugin
honors it since fb25f5a) and the vanilla-extract realContentHash:false
workaround is removed (manifest reads post-hash names now).

Verified: test:core 499; smoke 7/7; hmr-hdr 3/3; css+basename exactly
match pre-existing baselines (24 passed / 14 failed / 3 skipped / 1
DNR - zero new failures); corpus greps for vite-flavored helper names
come back empty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Assets referenced only by server code (asset?url imports, .css?url
files) are returned to the client as URLs but were never emitted to
build/client, 404ing at runtime. Mirroring upstream's ssrEmitAssets +
writeBundle move/remove: a node-target processAssets 'report' hook
(post-realContentHash, so names are final) relocates emitted static
assets into the client output when absent and strips them from the
server build; server code-split chunks get a proper async chunkFilename
and server-only .css?url output is redirected to the flat
static/assets layout while preserving postcss processing.

Verified against rsbuild source: dev serves from real disk when
writeToDisk is on (setupOutputFileSystem), cleanAll runs before
compilations so relocated files survive, and the uniform assetPrefix
keeps loader-returned URLs aligned. No rsbuild/rspack built-in covers
cross-environment asset sharing (tracedecay-searched), so the
relocation module stays.

Corpus: build-test + extra-server-environment now 9/9 (combined with
the post-realContentHash manifest fix, even code-split CSS passes);
smoke 7/7; test:core 506.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tests/react-router-framework/.tmp/ (7,856 materialized fixture files)
was accidentally committed by a broad git add during the corpus work,
inflating the PR diff massively. Untrack it and ignore fixture scratch,
test-results, and playwright reports going forward.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Four-angle review (reuse/simplification/efficiency/altitude) over the
RR8 branch diff:

- assetPrefix now has a single writer (onBeforeCreateCompiler); the two
  config-phase assignments are gone and the virtual-module publicPath
  reads output.assetPrefix locally
- RscModePlan drops its routeTransformExecutor/routeChunkOptions
  sentinels; the one unguarded consumer gates on plan kind
- shared parseVersionMajorMinor replaces two divergent react-router
  version parsers; getPackageVersion memoizes default-resolver lookups
- rsc-route-transforms imports CLIENT_NON_COMPONENT_EXPORTS from
  constants instead of redefining it; SPA_FALLBACK_HTML_FILE is a
  shared constant across both prerender pipelines; RSC basename/
  bootstrap prefixes reuse normalizeAssetPrefix (was 4 copies)
- route modules are no longer parsed for analysis in the node
  transform (client-entry covers every route; disk fallback intact),
  removing 1-2 redundant SWC parses per route per build
- ssr-asset-relocation caches relocated destinations across node
  compilations (serverBundles, dev rebuilds) skipping steady-state
  stat/write syscalls; dev-hmr skips redundant mkdir after first bump
- react-refresh runtime resolution no longer falls back to a bare
  root resolve that could bind a different physical instance than the
  browser graph (silent no-op refresh); unavailable now means the
  documented full-reload path
- devHmr options pass through the mode plan without re-projection;
  RSC virtual modules share a defaultExport helper; classic
  createResolveConfig drops its empty-alias conditional

Skipped deliberately: the node .css?url filename mapping (documented,
empirically-validated tradeoff), hooks-per-mode/discriminated-union
mode-plan reshape (deferred, larger), PrerenderConfig type unification
(low value vs inference churn), shared classic/RSC alias builder
(resolution semantics deliberately differ). manifestChunkNames on
RscModePlan was confirmed live (web clientStats), not dead state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The interop script's hand-rolled plugin API stub predates the
onBeforeCreateCompiler registration added for effective-asset-prefix
resolution, so CI's build-test failed with 'api.onBeforeCreateCompiler
is not a function'. The hook exists on the real Rsbuild plugin API
(@rsbuild/core 2.x); only the stub was stale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repo-wide sweep found exactly two stale references from the vite->
rsbuild corpus renames (template package name, a comment pointing at a
pre-rename test filename) plus one ambiguous upstream-provenance line
in the react-router-8 example README. Everything else matching vite*
is intentional: upstream BuildEndHook.viteConfig API surface, the
UPSTREAM.json renames/provenance maps, and rename documentation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Leftovers sweep follow-ups: the package-interop API stub gains
modifyBundlerChain and isPluginExists (only reached on the RSC path
today - same failure class as the onBeforeCreateCompiler break);
hdrRevisionModuleContent is de-exported (single in-file consumer).
tsc --noUnusedLocals verified zero unused imports; mode-plan/
entry-paths type exports stay - declaration emit requires them for
exported function signatures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- requestSingleFetchData now re-keys decoded SingleFetchRedirect
  entries onto the harness react-router's symbol instance - the fixture
  (RR 8.1) and harness (RR 7.18) each own a distinct
  Symbol('SingleFetchRedirect'), so equality assertions could never
  match (6 failures)
- SPA-mode preview serves build/client statically with an index.html
  fallback (extension-ful misses 404 so networkidle settles) instead of
  invoking react-router-serve on a server bundle SPA builds don't have
- the 'Custom dev servers need an Rsbuild dev-server adapter'
  placeholders are replaced with a real adapter (createRsbuild ->
  createDevServer -> express app.use(devServer.middlewares)), which the
  plugin's classic AND rsc dev handlers both attach to - covers 9 of 10
  custom-server cases; loader-context keeps an accurate throw (needs a
  plugin-side load-context entry, out of harness scope)

RSC bundler-mode fixtures (rsc-test/rsc-nojs, 4 failures) are NOT
converted: they target unstable_RSCRouteConfig bundler mode while the
adapter generates framework-mode configs - a fixture mode-migration
tracked separately, not a rename.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…l, splat warning, prerender root loader

Salvaged from credit-interrupted agents (quick-wins batch + workflow
prerender feature), verified via unit suite:

- dev/browser manifest no longer lists a route's own module inside
  route.imports (duplicate modulepreload hrefs)
- route-config-not-found error names app/routes.ts like upstream
  instead of the last-probed .tsx extension
- entry.client web entry sets html:false so no stray entry.client.html
  lands in build/client
- prerender:true now warns for dynamic/splat paths that cannot be
  enumerated, matching upstream's message
- ssr:false prerender validation exempts the root route's loader the
  way upstream does (root loader is allowed when prerendering)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/rsbuild-plugin-react-router@8676f0a

commit: 8676f0a

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Compared PR head 1cd7448 against base 94ed3cc.

Reading benchmark confidence

Raw deltas are always shown. The signal label only indicates whether the observed median delta is larger than a robust run-to-run noise band; it does not erase or replace the measurement.

The noise band is the larger of 2% or two combined robust standard deviations estimated from each side's relative median absolute deviation (rMAD). Fewer than three finite samples is reported as insufficient data. An inconclusive result should be rerun or investigated from the uploaded raw samples before drawing a performance conclusion.

Benchmark Runs Base total Head total Delta Base rMAD Head rMAD Noise band Signal
large-355-ssr-esm (build) 3 8.62s 9.60s +11.4% 0.3% 1.4% ±4.3% 🔴 regression
synthetic-1024-ssr-esm (build) 3 3.92s 3.96s +1.1% 0.9% 0.6% ±3.3% ⚪ inconclusive
synthetic-1024-ssr-esm-split (build) 3 5.43s 5.82s +7.2% 0.7% 0.4% ±2.2% 🔴 regression
synthetic-256-sourcemaps (build) 5 2.16s 2.20s +2.0% 0.1% 0.6% ±2.0% 🔴 regression
synthetic-256-ssr-esm (build) 5 1.99s 2.06s +3.1% 0.7% 1.2% ±4.1% ⚪ inconclusive
synthetic-256-ssr-esm-split (build) 5 2.38s 2.51s +5.2% 0.1% 0.8% ±2.3% 🔴 regression
synthetic-48-ssr-esm (build) 5 1.32s 1.38s +4.5% 1.8% 0.3% ±5.3% ⚪ inconclusive
large-355-ssr-esm (dev) 3 14.05s 15.13s +7.7% 0.4% 0.0% ±2.0% 🔴 regression
synthetic-1024-ssr-esm (dev) 3 4.10s 4.27s +4.3% 0.5% 0.9% ±3.1% 🔴 regression
synthetic-1024-ssr-esm-split (dev) 3 4.09s 4.37s +6.9% 1.3% 3.4% ±10.8% ⚪ inconclusive
synthetic-256-sourcemaps (dev) 5 1.84s 1.93s +5.0% 1.7% 0.4% ±5.1% ⚪ inconclusive
synthetic-256-ssr-esm (dev) 5 1.72s 1.77s +2.6% 0.9% 1.4% ±5.1% ⚪ inconclusive
synthetic-256-ssr-esm-split (dev) 5 1.71s 1.78s +4.4% 0.2% 2.0% ±5.9% ⚪ inconclusive
synthetic-48-ssr-esm (dev) 5 0.88s 0.90s +3.1% 1.0% 1.9% ±6.3% ⚪ inconclusive
complex app (cold) 3 112.28s 122.42s +9.0% 0.1% 0.3% ±2.0% 🔴 regression
complex app (dev) 3 97.55s 104.39s +7.0% 0.2% 1.9% ±5.6% 🔴 regression
complex app (warm) 3 80.18s 99.96s +24.7% 0.1% 0.8% ±2.4% 🔴 regression

Dev Rollup

Group Fixtures Base total Head total Delta Base ready Head ready Ready delta Base routes Head routes Route delta Base update/HMR Head update/HMR Update delta Speedup
All dev fixtures 7 28.38s 30.16s +6.3% 17.41s 19.52s +12.1% 3.76s 3.77s +0.2% 2.72s 2.57s -5.3% 0.94x
Large app 1 14.05s 15.13s +7.7% 7.61s 8.77s +15.4% 1.87s 1.84s -1.3% 1.66s 1.61s -2.5% 0.93x
Standard fixtures 6 14.33s 15.03s +4.9% 9.81s 10.75s +9.6% 1.90s 1.93s +1.8% 1.06s 0.96s -9.6% 0.95x

Production Build Benchmarks

Rendered 7 production build benchmarks.

Benchmark Runs Base total Head total Delta Head mean Head p95 Speedup Head RSS p95
large-355-ssr-esm 3 8.62s 9.60s +11.4% 9.64s 9.86s 0.90x 1601 MB
synthetic-1024-ssr-esm 3 3.92s 3.96s +1.1% 3.94s 3.99s 0.99x 602 MB
synthetic-1024-ssr-esm-split 3 5.43s 5.82s +7.2% 5.80s 5.84s 0.93x 771 MB
synthetic-256-sourcemaps 5 2.16s 2.20s +2.0% 2.20s 2.23s 0.98x 455 MB
synthetic-256-ssr-esm 5 1.99s 2.06s +3.1% 2.07s 2.13s 0.97x 436 MB
synthetic-256-ssr-esm-split 5 2.38s 2.51s +5.2% 2.51s 2.54s 0.95x 465 MB
synthetic-48-ssr-esm 5 1.32s 1.38s +4.5% 1.37s 1.39s 0.96x 300 MB

ci-small+ci-large Dev Fixture Summary

Rendered 7 dev benchmark fixtures from the ci-small+ci-large profile.

Benchmark Runs Base total Head total Delta Base ready Head ready Base routes Head routes Base update/HMR Head update/HMR Update delta Head mean Head p95 Speedup Head RSS p95
large-355-ssr-esm 3 14.05s 15.13s +7.7% 7.61s 8.77s 1.87s 1.84s 1.66s 1.61s -2.5% 15.15s 15.19s 0.93x -
synthetic-1024-ssr-esm 3 4.10s 4.27s +4.3% 2.74s 2.98s 0.53s 0.56s 0.33s 0.30s -8.0% 4.27s 4.31s 0.96x -
synthetic-1024-ssr-esm-split 3 4.09s 4.37s +6.9% 2.74s 3.06s 0.52s 0.58s 0.33s 0.30s -7.2% 4.38s 4.55s 0.94x -
synthetic-256-sourcemaps 5 1.84s 1.93s +5.0% 1.32s 1.46s 0.24s 0.22s 0.13s 0.10s -20.2% 1.93s 1.96s 0.95x -
synthetic-256-ssr-esm 5 1.72s 1.77s +2.6% 1.20s 1.29s 0.25s 0.22s 0.13s 0.10s -18.9% 1.76s 1.80s 0.98x -
synthetic-256-ssr-esm-split 5 1.71s 1.78s +4.4% 1.19s 1.31s 0.24s 0.22s 0.10s 0.10s -2.5% 1.78s 1.83s 0.96x -
synthetic-48-ssr-esm 5 0.88s 0.90s +3.1% 0.61s 0.64s 0.12s 0.12s 0.05s 0.05s -0.8% 0.91s 0.94s 0.97x -

large-355-ssr-esm Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 1071 358217.5ms 397947.2ms +11.1% 1972.1ms 611.2ms 6
node route:module 1071 75161.8ms 133393.2ms +77.5% 848.7ms 269.6ms 6
web route:client-entry 1071 59452.6ms 113002.6ms +90.1% 636.8ms 197.0ms 6
node manifest:transform 3 81.1ms 97.9ms +20.7% 97.9ms 40.7ms 3
web manifest:stage 6 13.3ms 8.8ms -33.8% 8.8ms 2.0ms 6
web manifest:transform 3 0.3ms 0.3ms 0.0% 0.3ms 0.1ms 3
node assets:relocate-ssr-only 6 - 80.5ms - 80.5ms 14.0ms 6

synthetic-1024-ssr-esm Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 3078 735628.7ms 729122.6ms -0.9% 1775.1ms 339.9ms 6
web route:client-entry 3078 302763.7ms 501498.2ms +65.6% 1107.9ms 314.0ms 6
node route:module 3078 299349.0ms 307527.4ms +2.7% 871.2ms 162.8ms 6
node module:client-only-stub 3 296.0ms 105.2ms -64.5% 105.2ms 49.4ms 3
node manifest:transform 3 157.0ms 167.6ms +6.8% 167.6ms 61.8ms 3
web manifest:stage 6 32.6ms 38.0ms +16.6% 38.0ms 7.3ms 6
web manifest:transform 3 0.3ms 0.3ms 0.0% 0.3ms 0.1ms 3
node assets:relocate-ssr-only 6 - 1.5ms - 1.5ms 0.4ms 6

synthetic-1024-ssr-esm-split Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 3078 709043.0ms 770334.4ms +8.6% 1826.3ms 387.5ms 6
node route:module 3078 373656.7ms 234273.0ms -37.3% 902.0ms 160.1ms 6
web route:client-entry 3078 305120.2ms 495165.7ms +62.3% 1226.9ms 307.5ms 6
node module:client-only-stub 3 468.6ms 55.8ms -88.1% 55.8ms 22.8ms 3
node manifest:transform 3 167.3ms 147.1ms -12.1% 147.1ms 57.1ms 3
web manifest:stage 7 31.9ms 33.1ms +3.8% 33.1ms 7.2ms 7
web manifest:transform 3 0.3ms 0.4ms +33.3% 0.4ms 0.2ms 3
node assets:relocate-ssr-only 7 - 1.7ms - 1.7ms 0.4ms 7

synthetic-256-sourcemaps Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 1290 701.8ms 645.4ms -8.0% 645.4ms 13.9ms 10
node route:module 1290 310.0ms 306.2ms -1.2% 306.2ms 11.7ms 10
web route:client-entry 1290 192.5ms 179.8ms -6.6% 179.8ms 5.4ms 10
node module:client-only-stub 5 121.7ms 12.3ms -89.9% 12.3ms 3.2ms 5
node manifest:transform 5 62.1ms 77.3ms +24.5% 77.3ms 18.5ms 5
web manifest:stage 10 13.6ms 10.2ms -25.0% 10.2ms 1.4ms 10
web manifest:transform 5 0.4ms 0.5ms +25.0% 0.5ms 0.1ms 5
node assets:relocate-ssr-only 10 - 3.1ms - 3.1ms 0.5ms 10

synthetic-256-ssr-esm Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 1291 682.3ms 653.5ms -4.2% 653.5ms 20.7ms 11
node route:module 1290 272.0ms 296.8ms +9.1% 296.8ms 10.4ms 10
web route:client-entry 1291 203.1ms 169.4ms -16.6% 169.4ms 5.8ms 11
node manifest:transform 5 80.6ms 81.2ms +0.7% 81.2ms 22.2ms 5
node module:client-only-stub 5 36.7ms 27.4ms -25.3% 27.4ms 18.4ms 5
web manifest:stage 11 11.4ms 11.0ms -3.5% 11.0ms 1.8ms 11
web manifest:transform 5 0.5ms 0.5ms 0.0% 0.5ms 0.1ms 5
node assets:relocate-ssr-only 10 - 2.4ms - 2.4ms 0.4ms 10

synthetic-256-ssr-esm-split Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 1290 698.2ms 649.4ms -7.0% 649.4ms 14.9ms 10
node route:module 1291 287.9ms 303.5ms +5.4% 303.5ms 7.4ms 11
web route:client-entry 1290 195.5ms 176.0ms -10.0% 176.0ms 5.3ms 10
node manifest:transform 5 90.9ms 70.3ms -22.7% 70.3ms 15.9ms 5
node module:client-only-stub 5 27.9ms 21.9ms -21.5% 21.9ms 8.4ms 5
web manifest:stage 10 11.4ms 13.0ms +14.0% 13.0ms 4.1ms 10
web manifest:transform 5 0.5ms 0.5ms 0.0% 0.5ms 0.1ms 5
node assets:relocate-ssr-only 11 - 2.6ms - 2.6ms 0.4ms 11

synthetic-48-ssr-esm Plugin Operations

Environment Operation Count Base total Head total Delta Head wall Head max Reports
web route:module 250 216.9ms 215.2ms -0.8% 215.2ms 6.7ms 10
node route:module 250 78.2ms 75.2ms -3.8% 75.2ms 3.7ms 10
web route:client-entry 250 55.1ms 34.3ms -37.7% 34.3ms 0.8ms 10
node module:client-only-stub 5 49.3ms 34.5ms -30.0% 34.5ms 8.6ms 5
node manifest:transform 5 25.5ms 25.1ms -1.6% 25.1ms 7.7ms 5
web manifest:stage 10 2.7ms 2.9ms +7.4% 2.9ms 0.4ms 10
web manifest:transform 5 0.5ms 0.5ms 0.0% 0.5ms 0.1ms 5
node assets:relocate-ssr-only 10 - 2.5ms - 2.5ms 0.4ms 10

Synthetic Rsbuild App

Rendered 2 production build benchmarks.

Benchmark Runs Base total Head total Delta Head mean Head p95 Speedup Head RSS p95
complex app 3 112.28s 122.42s +9.0% 122.88s - 0.92x -
complex app 3 80.18s 99.96s +24.7% 97.06s - 0.80x -

Rendered 1 dev benchmark fixture from the embedded complex app.

Benchmark Runs Base total Head total Delta Base ready Head ready Base routes Head routes Base update/HMR Head update/HMR Update delta Head mean Head p95 Speedup Head RSS p95
complex app 3 97.55s 104.39s +7.0% 87.97s 94.43s 3.05s 3.08s 2.32s 2.50s +7.5% 104.96s - 0.93x -

Profile: ci-small+ci-large; mode: dev; iterations: 5; warmup: 1.
The uploaded benchmark artifact includes diagnostics/summary.md and diagnostics/summary.json with runner metadata, per-run timing samples, CPU/RSS samples, and plugin timing hot spots.
Workflow run

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.

1 participant