Skip to content

Next 15.2 development performance regression #76937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mikehdt opened this issue Mar 9, 2025 · 12 comments
Open

Next 15.2 development performance regression #76937

mikehdt opened this issue Mar 9, 2025 · 12 comments
Labels
linear: next Confirmed issue that is tracked by the Next.js team. Performance Anything with regards to Next.js performance. React Related to React.

Comments

@mikehdt
Copy link

mikehdt commented Mar 9, 2025

Link to the code that reproduces this issue

https://github.com/mikehdt/nextjs-15-2-perf-issue

To Reproduce

  • pnpm i
  • pnpm dev

Click on some of the buttons and observe performance. There's a lag to the action.

  • Revert next in package.json to 15.1.7
  • pnpm i
  • pnpm dev

The buttons are noticeably more performant.

Current vs. Expected behavior

There should not be a performance regression?

Using the React dev tools profiler, we can see the difference (this is a slice that shows the render time for clicking one of the buttons):

Next.js 15.1.7

Image

Next.js 15.2.1

Image

Provide environment information

Running on Windows 11 / Node 22 but the env shouldn't really be an issue.

Which area(s) are affected? (Select all that apply)

React, Performance

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

It took me three days of trying to debug my own code in a personal project before I realised it wasn't me, it was next.js 😅

@github-actions github-actions bot added Performance Anything with regards to Next.js performance. React Related to React. labels Mar 9, 2025
@wrteam-sumit
Copy link

Yes, That one i am also facing an issue in latest one 15.2.1

@Jordaneisenburger
Copy link

I thought it was us but indeed there seems to be some regression.

@themcmxciv
Copy link

Same here, playwright tests became super flaky and some tests are failing, now I understand why :((

@ErDanieh

This comment has been minimized.

@samcx samcx removed the React Related to React. label Mar 13, 2025
@samcx
Copy link
Member

samcx commented Mar 13, 2025

@mikehdt Thank you for submitting an issue!

Taking a look—

@samcx samcx added the React Related to React. label Mar 13, 2025
@samcx samcx changed the title Next 15.2 performance regression Next 15.2 development performance regression Mar 13, 2025
@samcx
Copy link
Member

samcx commented Mar 13, 2025

@mikehdt This may be related to error message improvements via Owner Stacks. It looks like this may alleviate → facebook/react#32529.

@samcx
Copy link
Member

samcx commented Mar 13, 2025

Can confirm it is related to Owner Stacks in React!

@mikehdt
Copy link
Author

mikehdt commented Mar 16, 2025

Interesting. Looks like they're adding a debug helper thing that's got a not-insignificant performance penalty. It feels like if that's the case, it'd be better as an opt-in dev helper than anything like capping its execution times 🤔

It's probably worth questioning setting dependencies on bleeding-edge React commit versions, if something like this regression can get into a minor or patch version without being fully tested.

@github-actions github-actions bot added the linear: next Confirmed issue that is tracked by the Next.js team. label Mar 17, 2025
@saevarb
Copy link
Contributor

saevarb commented Mar 23, 2025

I've just upgraded from 15.1.x to 15.2.x due to the recent CVE and I immediately noticed this issue. What makes it particularly egregious is the fact that the CVE fix hasn't been backported to 15.1.x, so I feel I'm effectively forced to develop with 15.1.7 and then update to 15.2.x before pushing.

@rychlis
Copy link

rychlis commented Mar 23, 2025

I've just upgraded from 15.1.x to 15.2.x due to the recent CVE and I immediately noticed this issue. What makes it particularly egregious is the fact that the CVE fix hasn't been backported to 15.1.x, so I feel I'm effectively forced to develop with 15.1.7 and then update to 15.2.x before pushing.

Yes I'm in a similar position, would be great to fix this or back port to 15.1.x

@agussetyar
Copy link

@mikehdt This may be related to error message improvements via Owner Stacks. It looks like this may alleviate → facebook/react#32529.

It seems the PR has been merged and next already bump the react version.
Waiting for confirmation whether this issue has been fixed or not.

@themcmxciv
Copy link

just upgraded to 15.3, but playwright test still flaky and takes longer time to complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear: next Confirmed issue that is tracked by the Next.js team. Performance Anything with regards to Next.js performance. React Related to React.
Projects
None yet
Development

No branches or pull requests

9 participants