Closed w2819 closed 4 years ago
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 ng new repro-app
and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
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. Have you tried using angular in large projects?
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. https://github.com/angular/angular-cli/issues/17469
I think this issue will be closed with no solution....
I tried to pack the async modules separately there 9 modules build time: module1 78714ms module2 86224ms module3 112828ms module4 134244ms module5 171097ms module6 218403ms module7 143209ms module8 161373ms module9 113815ms but why together it‘’s so slow.
one pack: module2 module3 module7 module8 module9 456564ms
two pack: module3 module4 module5 640571ms
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. Please file a new issue if you are encountering a similar or related problem.
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?