-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Development performance improvements #4844
Comments
autodll-webpack-pluginI tried this and it works quite well out of the box. The website says it will become obsolete soon because of hard-source and webpack@5, but its still quite useful today, especially for sharing deps between Next.js page bundles. |
|
|
Implemented hard-source-webpack-plugin in #5181. Releasing it on canary right now. |
@timneutkens We should try webpack 5 with built-in disk cache https://twitter.com/TheLarkInn/status/1069246795031576576 |
Have there been any updates on this work? Especially #4843 |
Possibly related issue (still needs investigation): #9153 |
We're investigating other optimizations currently. |
@timneutkens is it will be possible Allow multiple pages in the same bundle for development performance improvement #4843 ? because navigating is really slowly but only on development |
Does someone know what happened to this?
|
We're currently working on upgrading to webpack 5 incrementally. webpack 5 has a built-in disk cache which will help with a lot of the slowdowns that were previously noted with webpack 4. |
I noticed that in developement some packages that expose both It would be faster to only use the |
This is a misconception. The loaders have different settings between the 2 configs as well. |
This happens on first access, but can we trigger it via an api call to NextServer? event - build page: /
event - compiled successfully |
Now that Next.js 12 is out I'm going to close this issue: https://nextjs.org/blog/next-12#faster-builds-and-fast-refresh-with-rust-compiler Note that closing this issue does not mean that we're going to stop optimizing Next.js performance, just that the things mentioned in this issue have been (mostly) implemented as well as many other optimizations that improve speed. We're still working on many other performance improvements on top of the new Rust-based compiler. If you're experiencing slowdowns with your application please see #29559 (comment) where I'm keeping track of common cases that apps take longer to compile. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
After discussions with @timneutkens, here are several ways to make Next.js faster to work with during development.
resolve.unsafeCache
Metrics
Profiling tools
--inspect
- profile any part of the app (including flamecharts with a slightly easier workflow than ProfilerPlugin I think)webpackDevMiddleware.stats = 'verbose'
stats.toString()
The text was updated successfully, but these errors were encountered: