-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
β Deploy Preview for nuxt3-docs canceled.
|
Does Vite also warmups the entrypoint in background? (Same for
Nice find and probably to late to fix if warmup is not relevant anymore π |
import type { Options } from '@vitejs/plugin-vue' | ||
import replace from '@rollup/plugin-replace' | ||
import { sanitizeFilePath } from 'mlly' | ||
import { buildClient } from './client' | ||
import { buildServer } from './server' | ||
import virtual from './plugins/virtual' | ||
import { warmupViteServer } from './utils/warmup' |
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.
If this is not relevant anymore I think we can remove util as well. Only I want to make sure vite and vite-node does the same because in past, without entrywarmup we were simply delaying it until first request.
I also tried to only warm up the entry (and let Vite crawl the deps), it ends up around 50s start-up time. I guess it might be because it occupied the execution time of other parts. I could do a more detailed benchmarking, and probably try delaying the warm-up with a timeout. |
I suggest this method to benchmark:
|
Let's experiment this as an option that we can disable. (sorry there were merge conflicts otherwise would push to same PR) ~> #6647. We should also track this:
~> #6649 |
π Linked issue
β Type of change
π Description
This reduces the start-up time of
nuxt.com
repo withviteNode: true
(nuxi dev
to first render on the browser)from 60s to 40s on my M1 Max Macbook Pro.
Reasoning:
server.transformRequest(url)
for both client/server. Where the server bundler actually needsserver.transformRequest(url, { ssr: true })
, which is actually using a different plugin pipeline and caches.π Checklist