We've noticed a massive increase in our Next.js build time as our project has grown. Initially, it took around 3 minutes, but now it's up to 16 minutes. We upgraded from Next.js v14 to v15, hoping for improvements, but saw no difference. After analyzing the trace file using trace-to-tree, it looks like node-file-trace-plugin is taking up a significant amount of time(not sure why). Interestingly, builds are relatively faster on our local Windows machines (~ around 7 minutes with Microsoft Defender disabled) compared to our Linux server.
System Information:
Operating System:
Platform: linux
Arch: x64
Available memory (MB): 15668
Available CPU cores: 4
Binaries:
Node: 22.14.0
pnpm: 10.6.2
Relevant Packages:
next: 15.2.2
eslint-config-next: 15.2.2
react: 19.0.0
react-dom: 19.0.0
typescript: 5.8.2
Next.js Config:
output: N/A
Key Dependencies: Tailwind CSS, TypeORM, Material UI, RSuite, React Icons, Twilio, SendGrid, AG Grid
Trace Analysis (Excerpt)
next-build