-
Notifications
You must be signed in to change notification settings - Fork 12k
"ng build -prod" is still extremely slow ! #17557
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
Comments
Hi @MINIAI, Can you please share a the project or a reproduction even privately? Unfortunately, without a reproduction we'll be unable to determine the root cause of the problem. A good way to make a minimal repro is to create a new app via This might be related to your directory structure so its really important to get an accurate repro to diagnose this. Thanks. |
This problem will only appear in large projects,more than 3000files. |
I found this issues, it's same with me,and you can search with keyword '92%'、'80%'、‘slow’,you can find this problem is always here. |
I think this issue will be closed with no solution.... |
I tried to pack the async modules separately |
one pack: two pack: It looks like adding up the time for each module to be packaged separately |
As @alan-agius4 said, there's not much we can do here without a reproduction of some kind. If you're able to share the project (even privately, for a short time) we can take a look. Larger projects tend to have slower build times as there more work for the build pipeline to do, but there are plenty of large applications which use Angular and have manageable build times. |
Sorry,It‘s company's projects that cannot be made public and share |
@MINIAI, unfortunately without a reproduction even privately shared we’re unable to investigate this issue further. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Description
ng build --prod in a large project is extremely slow !
I found many issue to this problem,but in the end, they didn't solve it properly(search by keyword '92%'、'80%'、‘slow’)
It takes 11min at 7.x, 15min at 8.x, now it's too slow to be tolerated. I even wonder if angular can be used for large projects.
🔬 Minimal Reproduction
Large projects has this problems
🔥 Exception or Error
1、80% chunk modules optimization ModuleConcatenationPlugin
2、92% chunk asset optimization
At this two points it takes so much time!
I have two project created by @nrwl/nx.
One has 256 files, it's build very fast with 3-5min.
The other project has 2,598 files, it's build so slowly.
Two projects share a lib (1000files)
ng build without ivy and all config closed by false(aot、buildOptimizer...) need so many memory that jenkins server always crash.
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: