Problems with turbopack in dev development being way too slow, taking 25 seconds for page to fully compile #85744
Replies: 3 comments 9 replies
-
|
No response, is the vercel team just pretending this doesn't happen with bigger projects, how am I supposed to trust Next.js as a product if it cant scale for my needs |
Beta Was this translation helpful? Give feedback.
-
|
We suffer from the same issue and it's got me pulling my hair out on a daily basis. I don't get forced restarts but have to restart often anyway because Turbopack often just refuses to incorporate the changes I've made with only a full restart doing the trick. If changes do get incorporated automatically then it's after a long delay (at least 30 seconds) but it seems to quickly devolve into just not incorporating changes. The odd thing is that it feels like Turbopack just isn't responding to the changes. When a recompile does happen Turbopack will often tell me it took a couple of seconds or less to compile the change (makes sense for something like a simple button change) however in reality my waiting time was a lot longer. It also takes an excessive amount of time to respond to changes in next.config.ts, almost as though there's a file watcher or queuing issue going on. I'm completely blind as to what's happening between hitting save on a file though and the changes maybe getting recompiled. Neither native Turbopack tracing nor experimental analyze features have provided any insight into what's going on. It would really help if there was an additional debug or verbose logging flag that could give some insight into Turbopack's internal processing. Our application is large with a lot of dependencies so I can understand initial build times being slow (disk caching should help 🙏🏻) however incremental recompiles being slow is a mystery to me, especially on very simple component or css module changes. Rebuilding everything is often the better experience than trying to work with incremental builds but obviously has a massive detrimenal effect on DX, especially when refining something. |
Beta Was this translation helpful? Give feedback.
-
|
Updates: We still have this issue, but I've generated an analyzed build so that maybe you can try and help me understand why these could potentially be so big in size: client.html
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm currently building a very complex page, which is essentially a dynamic dashboard builder, sort of like Grafana or Metabase. The page loads are taking forever, and with this page in specific, it takes a long time. But every single other page that we have in our application also takes a ridiculous amount of time. It takes anywhere from 15 seconds to, in this case, 25 seconds. When my machine is very slow, it can take up to a minute really, but in this case, it took 25 seconds, and the experience is complete trash. The dev server keeps restarting, and I'm just looking for a way of getting better performance. How can I optimize this? Is this really just a limitation? What can I do?
Yes I'm using Turbopack
Yes I've read https://nextjs.org/docs/app/guides/local-development
No I can't really share much code, but the compiled build of the page is approximately ~2.5MBs
Other pages are around ~500kBs
Video showing the turbopack-trace: https://www.loom.com/share/4e0aa5c58ea14bd8a03d892c5a85319e
Project setup
Our setup is essentially a monorepo with Turborepo and we have a apps/ folder which has just our Next.js application with another service that we have that's an internal service. Then in our packages we have our tRPC package, a db package and a few other utility packages. Essentially, what we do is we always compile our packages so that our typescript performance isn't bad when we use it in our Next.js app. Then we essentially just import it all as a private internal module.
Weird bugs
Additionally, I think it's important to mention that sometimes I have to restart my MacBook after developing for a long time because the HMR in hotreload just doesn't work anymore. I mean, I get a HMR error in the terminal saying that something failed, but I have no idea what, and it just doesn't work. The refresh doesn't work. I make a change, it doesn't reflect. It's extremely weird.
Additional information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:39 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T8103
Available memory (MB): 8192
Available CPU cores: 8
Binaries:
Node: 20.19.5
npm: 10.9.2
Yarn: 1.22.22
pnpm: 10.7.1
Relevant Packages:
next: 16.0.1
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: N/A
Next.js Config:
output: standalone
Example
I can't provide this because it's internal code from our organization.
Beta Was this translation helpful? Give feedback.
All reactions