[Perf]: reuse unchanged server builds while preserving manifest and data refresh
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react, typescript
- Bereich
- build-system, devtools, performance
Rechercherichtung
Start at src/dev-generation.ts#finishAttempt and src/dev-runtime-artifacts.ts#evaluateServerBuilds, including pinServerBuildsToManifests, then review the linked Rsbuild runner-reuse proposal. The work is done when compatible consumed outputs reuse a coherent runtime, changed or uncertain outputs fall back safely, generation and HDR checks remain correct, and the listed overlapping, failure, manifest, and teardown cases pass.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
A new Node compilation can reevaluate unchanged server modules before Hot Data Revalidation (HDR) refreshes route loader data. Requested: retain an evaluated build when compatible, while still committing the matching browser manifest and acknowledging HDR for the accepted compilation.
Published rsbuild-plugin-react-router 0.8.1 evaluates server builds when the Node compilation changes. evaluateServerBuilds calls loadBundle for each entry. Rsbuild 2.2.9 caches by Stats and entry, so a new compilation creates a fresh runner on first load.
Local implementation and contract
An unpublished source candidate adds:
pluginReactRouter({ unstableDevServerBuildCache: true })
It retains the accepted build only when all non-debug-map runtime outputs, membership and loading layout remain unchanged after complete successful emission. Changed unloaded JavaScript and same-name JSON/WASM changes take fresh evaluation. Unknown metadata, failures and superseded generations invalidate reuse. The option defaults off and applies only to classic development. Published 0.8.1 does not include it; the local package still carries that version.
Module state and initialization-time reads persist across same-output edits, including registered dependencies. Read changing data per request, encode it into output, or restart development to reset. Source-map-only changes need not refresh existing VM debugging state. This is an explicit state-lifetime policy.
Every accepted generation still receives a new manifest-pinned envelope and advances Node identity before notifications. Existing dependency snapshots and compiler-pairing checks remain. The cache reads compiler metadata, not asset contents; its observer still has measurable overhead.
Reproduction and source patches
Download the source-only reproduction and setup instructions. Run node public-repro-package.mjs ./router-cache-repro, then follow its README. The package contains three patches against published commit dc11d26292f014a62276eb7dddf9c16e7b5faa47: separate CSS-manifest prerequisites, the single-development-entry prerequisite, then the typed seven-file cache implementation. All three reproduce the candidate's 82 source files exactly. Its README gives source-build commands and pinned dependencies; fresh dependency installation remains untested, and the fixture has no transitive lockfile.
The fixture uses Node 24.19.0, Rsbuild 2.2.8, Rspack 2.2.6 and React Router 7.18.1. Omitted/enabled controls cover 20 stages each: singleton continuity, intentionally retained registered-input values, same-name emitted JSON changes with identical JavaScript, changed loaders/CSS/renderer, unloaded imports, output removal, post-emission failure and superseded evaluation. WebSocket receipts check committed manifest identity and manifest-before-HDR order. Results and package hashes accompany this tiny compiler/SSR test; it has no browser or performance claim.
Remaining boundary
Rsbuild #8496 contains the executed public reproduction of the broader consumed-output request: preserve eager modules when only an unloaded chunk changes, while ensuring future imports are fresh. That requires runner-level support; this Router candidate rejects that case.
The cache applies only when all runtime output is unchanged. If a component edit changes an already evaluated server entry, it must reevaluate; this proposal does not supply finer-grained server HMR or skip that work. The fixture measures correctness, including changed loader/CSS/renderer fallbacks, and does not demonstrate an application performance improvement.
Production/RSC, multiple-entry/client and broader concurrent-runtime behavior remain outside the public fixture's coverage.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 145
- Forks
- 13
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rstackjs/rsbuild-plugin-react-router
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
-
[Feature]: Support on-demand compilation of SSR dynamic imports without reloading unrelated pagesOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
rstackjs/rsbuild-plugin-react-router#155 · 1 Kommentar ·
Alle Issues in rstackjs/rsbuild-plugin-react-router
Ähnliche Issues
-
[Bug]: Manager UI logo fails to load — broken external URLEvtl. vergeben @kavindu-udara hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
excalidraw/excalidraw#12743 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: cli priority: P2 type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
appandflow/stim#6381 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ui-kit type: chore
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
schlessera/brain-kit#4598 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue spec
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100