Overhaul SSR caching, dev hot-reload, and server memory footprint#200
Open
Uttkarsh-Srivastava wants to merge 16 commits intofeature/fetchPriorityLowfrom
Open
Overhaul SSR caching, dev hot-reload, and server memory footprint#200Uttkarsh-Srivastava wants to merge 16 commits intofeature/fetchPriorityLowfrom
Uttkarsh-Srivastava wants to merge 16 commits intofeature/fetchPriorityLowfrom
Conversation
…t-core into expose-gc
…ross platforms Replaced Node.js native --watch-path flags on Windows with chokidar-based watching (already used on Mac/Linux), eliminating the double-trigger bug where a single /server file change caused both a process-level restart and an in-process Express restart simultaneously. Also fixes EADDRINUSE race condition by introducing restartServer() which nulls serverInstance before close(), preventing concurrent chokidar events from each queuing independent startServer() callbacks on the same socket. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o feature/fix-memory-usage-v3
|
DeputyDev will no longer review pull requests automatically.To request a review, simply comment #review on your pull request—this will trigger an on-demand review whenever you need it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ChunkExtractorinstances are now cached per route instead of being created on every request.loadable-stats.jsonis also parsed once and held in memory, eliminating repeated disk reads.extract.jsrefactored to derive CSS and preload JS links directly from the cachedChunkExtractorinstance, removing the separaterouteCssCacheandpreloadJSLinkCachemaps.filesystemcache in development mode (written tonode_modules/catalyst-core/.cache/webpack), reducing rebuild memory pressure and speeding up incremental builds.--watch-pathflags with achokidarwatcher insidestartServer.jsthat watches the app's/serverdirectory. On change,requirecache is cleared (clearServerCache) and the server restarts cleanly.restartServer()now nullsserverInstancebefore callingclose(), preventing concurrent watcher events from each scheduling an independentstartServer()callback on the same closing socket.EADDRINUSE.handler.development.jsSSR bundle. Both environments now use the samehandler.jsentrypoint.cleanCacheCLI command — Newcatalyst cleanCachecommand removes the webpack filesystem cache andloadable-stats.json, forcing a full rebuild on next dev start.100kbto prevent oversized payloads from inflating heap usage.eval-cheap-module-source-mapdevtool — Switched frominline-source-map(embeds full source maps in bundles) toeval-cheap-module-source-mapfor faster builds and lower memory footprint in dev.react-refresh/babelto the development Babel env for proper fast-refresh support.css-hot-loader— Dropped the old CSS hot loader; CSS updates are now handled through React Refresh and the webpack dev server HMR pipeline.