[NEXT-1143] Dev mode slow compilation
Problem
⚠️ this original post has been edited by @timneutkens to reflect this comment ⚠️ Changes in the past week I've been investigating this over the past week. Made a bunch of changes, some make a small impact, some make a large impact. Here's a list: Affects all applications https://github.com/vercel/next.js/pull/50745 https://github.com/vercel/next.js/pull/50795 -- If you don't have a favicon.ico https://github.com/vercel/next.js/pull/50379 -- If you have both `pages` and `app` and you're only working on `app` it will no longer compile the runtime for `pages`. Note: this shifts the compilation of the runtime to when you first open a page Might not affect your app https://github.com/vercel/next.js/pull/50792 -- This one I've only been able to reproduce on the Vercel website in development, it might make your compilation a lot faster (i.e. 50% faster for Vercel's website) but in most cases it likely won't affect your application. You can try them using `npm install next@canary`. Help Investigate In order to help me investigate this I'll ideally need an application that can be run, if you can't provide that (I understand if you can't) please provide the `.next/trace` file. If possible follow these steps which would give me the best picture to investigate: `npm install next@canary` (use the package manager you're using) -- We want to make sure you're using the very latest version of Next.js which includes the fixes mentioned earlier. `rm -rf .next` start dev
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [NEXT-1143] Dev mode slow compilation
Same for me also dev env ,navigating to different pages via link component is pretty slow
Trust Score
9 verifications
- 1
Same for me also dev env ,navigating to different pages via link component is pr
Same for me also dev env ,navigating to different pages via link component is pretty slow
Validation
Resolved in vercel/next.js GitHub issue #48748. Community reactions: 112 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep