[Perf]: reuse unchanged server builds while preserving manifest and data refresh
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- react, typescript
- Domaine
- build-system, devtools, performance
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 145
- Forks
- 13
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rstackjs/rsbuild-plugin-react-router
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
-
[Feature]: Support on-demand compilation of SSR dynamic imports without reloading unrelated pagesOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
rstackjs/rsbuild-plugin-react-router#155 · 1 commentaire ·
Toutes les issues de rstackjs/rsbuild-plugin-react-router
Issues similaires
-
[Bug]: Manager UI logo fails to load — broken external URLPeut-être pris @kavindu-udara l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
excalidraw/excalidraw#12743 ·
Les mainteneurs répondent en général sous 1 jour
-
area: cli priority: P2 type: bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
appandflow/stim#6381 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area: ui-kit type: chore
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
schlessera/brain-kit#4598 ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue spec
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100