NG Builds takes 5 minutes on Build Server (build agent)
See original GitHub issueBug Report or Feature Request (mark with an x
)
My build agent is building the project ng build
on a build server (windows) which has 32 cores. The problem is when building the project it only runs 1 core to 100% and all other cores are doing nothing.
Is there a option or can we change that somehow in a setting?
Now it takes 5 minutes and I think if it uses more cores it will be seconds…
Versions.
CLI 1.4.0-beta-0 NPM 5.3.0 Node 8.3.0
Repro steps.
ng build --prod
The log given by the failure.
Desired functionality.
Needs to be faster, is there a option to use all cores?
Mention any other details that might be useful.
Windows Server with 32 cores.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:26
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Improving production build time for Angular 8 application in ...
Hey according to the documentation you can optimize you builds with ... This is the normal build time typically getting by build agent...
Read more >Troubleshoot pipeline runs - Azure DevOps - Microsoft Learn
An additional reason that runs may not start is that your organization goes dormant five minutes after the last user signs out of...
Read more >Npm v12 taking too long to build on host agent
The npm install in the pipeline that always takes 2 to 3 minutes, today is taking around 50 minutes. But not all builds,...
Read more >Azure Build Agents - YouTube
This lecture is part of the course "Implementing and Managing #Azure Build ". Start training at https://clda.co/2xG4lTM!
Read more >How to speed up your Angular builds - Bitovi
If code takes even two minutes to compile, it's easy to get distracted. ... I tested every command-line option for ng build for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also fully encourage the use of multiple cores. My CPU utilization is only 16-20% throughout the entire build process, and it takes 3 minutes for me. Memory is at 2gb. Disk usage is 0%.
I’m upgrading to an i7-8700k soon - and that’s going to have 6 cores. Yes, the cores will run at a higher clock speed, but my current CPU is already running at 4.2ghz so I’m not expecting as big of a jump as I would like.
It would be amazing if my 3 minute build time could go down to 30 seconds. Like omg I would give you a million hugs.
I’d also highly appreciate if angular cli would try to actively use parallelization of build steps where this is achievable. We have a medium-sized project with over 200 components and around 20 modules. We have seen compile times increase a lot with every module that we add, so we’re currently at around 80s with AOT for a build on a Core i7-7700k (pretty much the fastest single thread desktop CPU you can get).
We’re building three variants of our app in parallel, so we can make up a bit for it but since each build needs ~2GB of RAM that’s not a nice load pattern for our CI servers, which therefore build sequential. We’d get a huge productivity boost from faster local builds running
ng serve
as well, which takes roughly 45s without AOT for initial display.Have you seen this article here? https://medium.com/webpack/typescript-webpack-super-pursuit-mode-83cc568dea79 For sure it would speed up typescript compilation and then there’s still AOT, but I think it’s worth giving it a shot.
On a related note, the angular AOT compiler could theoretically build modules in parallel, couldn’t it? On first sight, that sounds like a plausible idea anyway.