-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Using previous releases of Next.js build time for pages in development mode as been more or less instant (taking at most a second or two to build a page for the first time, with changes being hot reloaded instantly).
Current Behavior
When using Next.js 5.0 build times for pages in development mode are much slower, often taking several (e.g. 5-10) seconds both for initial page build and for a change to be hot reloaded.
I am seeing this same issue across multiple codebases, and someone has raised it as a performance issue against nextjs-starter project, which recently upgraded to 5.0: iaincollins/nextjs-starter#67
Steps to Reproduce
- Clone example project 'https://github.com/iaincollins/nextjs-starter' and start with
npm run dev
. - Observe performance building pages with Next.js 5.
- Stop it and run
npm i [email protected] --save
and start again withnpm run dev
. - Observe much better performance building pages.
Context
I don't see this issue on very small sites (4-5 pages, no components) but I see it across all production Next.js sites I run, so it's not just project specific for me.
I appreciate it might still be something specific I am doing in those projects, or perhaps just because they all have more components involved.
I'm not sure how best to investigate what's causing this (and was a bit uncomfortable raising an issue without a better understanding of how to diagnose it) but as the performance is fine with Next.js 4, it seemed worth raising as an issue as I assume I'm not the only one impacted and if there are things I'm doing that can be avoided to improve performance then it's good to know what they are for others too.
Your Environment
Tech | Version |
---|---|
next | 5.0 |
node | 7.10.1 |
OS | macOS 10.13.2 |
browser | Chrome, Safari |