-
Notifications
You must be signed in to change notification settings - Fork 26k
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
[NEXT-1172] Performance of the build has detoriated after 13.3.0 #49593
Comments
Hi, this has been updated in |
Sadly, this fix didn't seem to solve the issue we are having. I was able to pinpoint an exact canary version where this issue started v13.2.5-canary.25...v13.2.5-canary.26
Before increasing the value of the
With the latest canary version, it has a really small impact on build time or CPU usage:
I got those numbers using This issue causes build time to increase quite much in our real-world project when building it (1 minute build time to 6 minutes):
|
We'll investigate further 👍 |
This removes the `computeWorkerKey` from our static workers as this doesn't work in practice as efficiently as we hoped since a single page can have thousands of paths to render which won't be distributed to separate workers if the same worker key is returned. Fixes: #49593 **Before** ![before](https://github.com/vercel/next.js/assets/22380829/da1e0a03-8b15-42a6-a2ac-6e4ff29c350d) **After** ![after](https://github.com/vercel/next.js/assets/22380829/b27354f6-bcdb-4cad-888c-7d6b143e0ee2)
For us the problem seems to be mitigated since using version 13.3.4 (including #50194). The build times are not as low as we are experiencing in our current 12.3 deployments but compared to 13.3.3 and before the build times dropped significantly. Thanks for the fix! |
It seems the build workers count calc change that was made in vercel#47823 caused a regression in performance as we aren't utilizing as many workers as we previously did so this moves that change behind an experimental flag while additional tweaking is investigated. x-ref: vercel#47823 Fixes: vercel#49593
This removes the `computeWorkerKey` from our static workers as this doesn't work in practice as efficiently as we hoped since a single page can have thousands of paths to render which won't be distributed to separate workers if the same worker key is returned. Fixes: vercel#49593 **Before** ![before](https://github.com/vercel/next.js/assets/22380829/da1e0a03-8b15-42a6-a2ac-6e4ff29c350d) **After** ![after](https://github.com/vercel/next.js/assets/22380829/b27354f6-bcdb-4cad-888c-7d6b143e0ee2)
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. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 Binaries: Node: 18.15.0 npm: 9.5.0 Yarn: N/A pnpm: N/A Relevant packages: next: 13.4.2-canary.4 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/jonime/next-build-multithreading-issue
To Reproduce
npm run build
Describe the Bug
Build performance has deteriorated after updating to 13.3.0 or later. The build process doesn't seem to use cores properly because CPU usage is less than 100%.
Expected Behavior
Build should be faster
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-1172
The text was updated successfully, but these errors were encountered: