-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Description
Link to the code that reproduces this issue
https://github.com/apostolos/next.js-repro-canary-regression
To Reproduce
- Enable any experimental feature that switches to react canary (via
next.config.ts
) - Start the dev server and open http://localhost:3000
- Refresh the page or change any part of the code and wait for HMR
- Notice compilation time regression
Current vs. Expected behavior
When we don't have any experimental features enabled, page rendering & HMR speeds remain fast and consistent.
After enabling any experimental feature that requires canary react (PPR, viewTransition, taint, etc.), compilation speeds are majorly affected.
We notice anything between 3x to 5x slowdowns in webpack. Turbopack is even worse, sometimes reaching multi-second HMR compilation times in a medium-sized codebase.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:25 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6020
Available memory (MB): 32768
Available CPU cores: 12
Binaries:
Node: 24.3.0
npm: 11.4.2
Yarn: 1.22.22
pnpm: 9.15.9
Relevant Packages:
next: 15.4.0-canary.114 // Latest available version is detected (15.4.0-canary.114).
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.8.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Performance
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
We tested the reproduction in most of the latest canaries.
AFAICT, the biggest regression starts in v15.4.0-canary.98
React gets upgraded in #80804 from 197d6a04-20250424
to fa3feba6-20250623
with tons of Flight updates getting merged, so hard to tell what exactly is going on.