next.js: Fast refreshing is very slow had to wait along time for it to update.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Next 13.4.3

Node 18.12.1

Project was created with create-next-app@latest with tailwindCSS and shorthand @

Device

Mac book pro 14 M1"

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Script optimization (next/script), Turbopack (–turbo)

Link to the code that reproduces this issue or a replay of the bug

https://github.com/Haseebshah936/combat_companion

To Reproduce

You can see the code for the project here https://github.com/Haseebshah936/combat_companion

Describe the Bug

I have been developing this site for my client in next 13 with app directory but any changes made inside the code are displayed very slow on localhost dev client. I have even tried --turbo but still it is very slow.

Expected Behavior

It should update the site as soon as I make any change in code

Which browser are you using? (if relevant)

Edge, Chrome

How are you deploying your application? (if relevant)

Vercel, next start

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 11
  • Comments: 18 (3 by maintainers)

Most upvoted comments

this is the only framework where in dev I’m scared to mousehover anything

Same issue here (without turbo) - 2 minutes for a build in appDir that would otherwise take 8 seconds in pages dir. And fast refresh is rebuilding everything vs. just the relevant modules (which doesn’t happen in pages dir). Can’t use turbopack because of module resolution errors so I haven’t tried that, but it shouldn’t take 20X more just because of appDir.

image

Running this on an 8-Core Intel Core i9 64 GB RAM so it’s not a hardware resource issue.

this is the only framework where in dev I’m scared to mousehover anything

🤣 me too, I disabled it, too much scared haha, now I’m good but things are slow as always.

I’m just kidding. But look….

i don’t understand the claim they does about turbopack, i come to nextjs cause a lot of people was talking about turbopack and the claim they were saying was really promising. But TURBOPACK is slower than webpack and by far. Only hmr is faster than webpack hmr. But is really a nightmare working on dev. And production has multiple issues, but well they can be manageable. DEV environment is just super super bad, is really frustrating. I hope they get the claim they said about turbopack I really think they will get at some point.

Don’t take me wrong I like the project, but you maybe have to focus first on polish this before enter in new features and keep the development environment working normal at least. Right now is really slow and frustrating.

In my case it is using upto 5.2 gb of ram when runing it takes 2.5gb to just start the server and then if I switch a page it spicks to 5.3gb. Right now what I am doing is developing the site on react and then moving the code next and converting it according to next 13 standards

just bought a i9-13900KF, what can you do, let’s see if it improves the situation, it does not help the fact that I’m running in docker even in dev

I’m running on an i9 64GB RAM and it doesn’t help at all. Gonna switch to an M2 Max 96GB RAM in a few days and hope for the best. Not sure if related to this: https://github.com/vercel/next.js/issues/50332

@joacub what do you suggest me in that case. I switched to 13.2.4 the normal dev mode with out turbo pack got better but still not what I was expecting it to be. As I mentioned above I am working on a major business site for my client and it’s a PWA as well. Due to the hype of next js specially next 13 and the upgrades the promised in it, I spent time in learning next 13 with app dir but after building just the landing page for the site. I am feeling that it’s not what I was expecting it to be. So I am thinking of switching back to react. What do you suggest on this as it is not too late for me and shifting the code will not take more than a day.

Any update on this?

NextJS 14 compiles changes in at least 20 seconds on a Turborepo project with one page.

I am using M1 pro 14 inch 16 gb. It is not about hard it’s related to next it’s and their app dir. I down graded my version to 13.2.3 and it workers fine. But that version have issue with turbo and also doesn’t have server action’s. I personally think that they might solve the problem in the upcoming release because they normally do a new release with fixes and new achievements every month. So let’s hope for the best.

On Mon, May 29, 2023, 4:36 PM Altechzilla @.***> wrote:

just bought a i9-13900KF, what can you do, let’s see if it improves the situation, it does not help the fact that I’m running in docker even in dev

I’m running on an i9 64GB RAM and it doesn’t help at all. Gonna switch to an M2 Max 96GB Ram in a few days and hope for the best. Not sure if related to this: #50332 https://github.com/vercel/next.js/issues/50332

— Reply to this email directly, view it on GitHub https://github.com/vercel/next.js/issues/50361#issuecomment-1567020768, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQQ5XXRBT5RUCL47ZX7YB3XISC3RANCNFSM6AAAAAAYPPURYY . You are receiving this because you authored the thread.Message ID: @.***>

@joacub what do you suggest me in that case. I switched to 13.2.4 the normal dev mode with out turbo pack got better but still not what I was expecting it to be. As I mentioned above I am working on a major business site for my client and it’s a PWA as well. Due to the hype of next js specially next 13 and the upgrades the promised in it, I spent time in learning next 13 with app dir but after building just the landing page for the site. I am feeling that it’s not what I was expecting it to be. So I am thinking of switching back to react. What do you suggest on this as it is not too late for me and shifting the code will not take more than a day.

It really depends, Nextjs at some point will get the heaven point. But still not mature. It really depends. Nextjs has some Benefits and some drawbacks. If is a simple project you may use a simple react application. Or just use remix run , they are less opinionated and has more open development experience. They are really fast but how I said it really depends.

if you need stability now try to go back to pages if you want to stick with next.

My opinion is let’s push nextjs team to improve the development experience (next team seems be really good) and they will get that sweet point faster and we will get benefit on not having to spend time in all the process that next already does.

Can replicate, on Windows 11 and Ubuntu 22.04:

  • Node version : Lts/hydrogen (-> v18.16.0)
  • npm version: 9.5.1
  • Next v13.4.4