-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(remix-dev/vite): extract route module exports in parallel #8111
perf(remix-dev/vite): extract route module exports in parallel #8111
Conversation
…ute manifest generation
|
Name | Type |
---|---|
@remix-run/dev | Patch |
create-remix | Patch |
remix | Patch |
@remix-run/architect | Patch |
@remix-run/cloudflare | Patch |
@remix-run/cloudflare-pages | Patch |
@remix-run/cloudflare-workers | Patch |
@remix-run/css-bundle | Patch |
@remix-run/deno | Patch |
@remix-run/eslint-config | Patch |
@remix-run/express | Patch |
@remix-run/node | Patch |
@remix-run/react | Patch |
@remix-run/serve | Patch |
@remix-run/server-runtime | Patch |
@remix-run/testing | Patch |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
opting to merge all perf improvements into a single changeset instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
This is a first idea extracted from #8102.
I think currently "for loop + await" in
getDevManifest
could be a bottleneck of initial server startup time for a project with many routes. Assuming vite can genuinely run transform in parallel (multi threaded in esbuild? or at least some file IO?), wrapping multiplegetRouteModuleExports
calls byPromise.all
seems to help.My example is a small project (the code is here hi-ogawa/ytsub-v3#519) but I can still observe some difference. It's a primitive benchmark, but here is a quick comparison (I'm adding
console.time/timeEnd
to check the timing of code blocks):before
after