next.js
next.js copied to clipboard
Tremendous performance drop with middleware after 12.3.2-canary.29 .
Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System: Platform: win32 Arch: x64 Version: Windows 10 Enterprise LTSC 2021 Binaries: Node: 16.17.1 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.0.1-canary.2 eslint-config-next: 12.3.1 react: 18.2.0 react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Sorry about spamming with this but as days go on and no official fix exists I feel it's urgent.
@balazsorban44 closed #41551 without allowing me to respond and ask for details clarification, however I have done much investigation with multiple node versions and machines tested. It's CLEAR that after 12.3.2-canary.29 using middleware literally breaks performance, every single image response takes about one second and my site's performance drops to half.
I have also posted #42225 which is related to older #38273 and #38235 which had been fixed. Please pay some attention to this.
12.3.2-canary.29:
12.3.1:
Expected Behavior
Middleware should not break perfomance
Link to reproduction
https://github.com/11koukou/my-app
To Reproduce
Simply clone the project, npm install, npm run build, and npm start. Check out the performance and then disable/delete the "middleware.ts" file , repeat the steps and check the performance again. Without middleware lighthouse reports 100. The photos posted above are not from testing this simple repo but from my production website which I can not yet publish, but they are real.
I think I found the problem: https://github.com/vercel/next.js/issues/42349
Great, thank you very much in advance
No fix after latest release :(
The above patch is now available in v13.0.3-canary.1
of Next.js, please update and give it a try!
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.