Skip to content

Dev server startup perf - #15

Merged
koculu merged 2 commits into
mainfrom
dev-server-startup-perf
Oct 5, 2026
Merged

koculu merged 2 commits into
mainfrom
dev-server-startup-perf

Conversation

@koculu

@koculu koculu commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Improve PureStack dev-server startup performance by switching the default serve workflow from a full initial build to render-on-request.

The server now prepares shared state such as routes and navigation at startup, then renders pages and copies assets only when they are requested.

Changes

  • Render pages lazily on first request and cache the generated output.
  • Copy static assets only when requested.
  • Invalidate affected pages and script bundles on file changes instead of rebuilding them immediately.
  • Re-render invalidated pages on their next request.
  • Add --full-render / fullRender: true to preserve the previous full-build-at-startup behavior when needed.
  • Build the development Pagefind index from pages rendered during the current session.
    • --full-render, build, and publish still generate the complete search index.
  • Improve request handling for:
    • hidden-locale i18n routes
    • encoded URLs
    • direct index.html requests
    • extensionless assets
    • static directories
  • Handle edits that occur while a page is already being rendered without losing invalidation state.
  • Expand dev-server tests around lazy rendering, assets, watched changes, Pagefind, i18n, and full-render mode.
  • Update CLI and documentation for the new behavior.
  • Bump packages to 1.1.4 and update Vite/Vitest dependencies.

Result

purestack serve can become ready without compiling every page in the site, substantially reducing startup work for larger projects while keeping full static generation available through --full-render.

@koculu
koculu merged commit 549a89d into main Oct 5, 2026
2 checks passed
@koculu
koculu deleted the dev-server-startup-perf branch October 5, 2026 21:56
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