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
Drastic increase in build and warm up times when upgrading to 3.9.0 #25072
Comments
Start a new pull request in StackBlitz Codeflow. |
Would you be able to provide a reproduction? 🙏 More infoWhy do I need to provide a reproduction?Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. What will happen?If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect. If How can I create a reproduction?We have a couple of templates for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as minimal as possible. See more details in our guide. You might also find these other articles interesting and/or helpful: |
Would be nice to see if it is based on the amount of components or something else triggeres the high build time. Can you try to repro? Without a repro I don't think we can do much here as it can be any kind of module or similar 🙈 |
We'd definitely want to tackle this if you can provide a reproduction. Can you try installing vite v5 in your Nuxt 3.8.2 project, to see whether that's the cause? It should be completely compatible, but you'll need to use npm/pnpm/yarn resolutions/overrides. |
I could not find any information on how to do this. Simply using
|
All right, @manniL helped me 👍 (using resolutions instead of overrides did the trick 🤷♂️) Vite 5 seems to be the culprit indeed: |
It would be great to have a reproduction. Hopefully this is something we can solve in vite. 🙏 |
One thing - when you set |
So I did some tests and took screenshots of the nitro console and the browser timeline in the network tab. I waited for all chunks to be loaded: |
cc: @antfu would love your thoughts on this |
From the glance I can't really tell what's the cause. I think we still need a minimal reproduction to move forward |
Sorry about my comment yesterday (which I deleted) - I didn't notice that one of my projects was modified, leading to false results.
Alltogether, I have ~2104 calls of warmup() with nuxt@3.8.2 and ~5936 calls of warmup() with nuxt@3.9.1 which makes me think that maybe the increased number of calls is the sole reason for longer warmup times. I tried looking into vites' server.moduleGraph.getModuleByUrl() but haven't found out where |
Was this helpful at all, or is there something else I could try to help solving this issue? 🤔 |
@manniL suggested that I "empty" my templates and try again. We have +/-350 vue files and I replaced all templates by These are the startup times: Although significantly decreased, the build time with Nuxt 3.9.3 is almost double the time it took with Nuxt 3.8.2. EDIT: I ended up stripping away most of the code, keeping "only" empty components. The built time got much better, but the warmup times were always worse with 3.9.3. So it appears that the number of files has a direct effect on the warmup time 🤔 |
So this issue seems to be resolved with 3.11.1... closing this. |
Fantastic! 🎉 |
Environment
Reproduction
I tried, but it does not really show with an empty project 🤔
3.8.2 https://stackblitz.com/edit/github-r32mz1-hj5c5o?file=package.json
3.9.0 https://stackblitz.com/github/nuxt/starter/tree/v3/?file=package.json
Describe the bug
My (large) project:
3.8.2:
3.9.0:
Switching back to 3.8.2 leads to the shorter loading times again.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: