trion-development/docker-ng-cli-karma

Angular 8 build times extremely slow

Closed this issue · 5 comments

Hello, I've been using your docker images for Angular builds for a while (thank you!) and across Angular versions.

Currently using trion/ng-cli-karma:8.3.12 to build an application that is upgraded to Angular 8.

The build time is now taking a very very long time. Something that builds in about a minute takes 20-40 minutes.

I run the build on Gitlab CI.

$ ./node_modules/@angular/cli/bin/ng build zontally-page-designer --prod --output-hashing=none --base-href=/static/dist/zontally-page-designer
Generating ES5 bundles for differential loading...

WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 589 kB.
ES5 bundle generation complete.

chunk {0} runtime-es2015.js (runtime) 1.45 kB [entry] [rendered]
chunk {0} runtime-es5.js (runtime) 1.45 kB [entry] [rendered]
chunk {1} main-es2015.js (main) 1.06 MB [initial] [rendered]
chunk {1} main-es5.js (main) 1.16 MB [initial] [rendered]
chunk {2} polyfills-es2015.js (polyfills) 57.2 kB [initial] [rendered]
chunk {3} polyfills-es5.js (polyfills-es5) 143 kB [initial] [rendered]
chunk {4} styles.css (styles) 242 kB [initial] [rendered]
chunk {scripts} scripts.js (scripts) 459 kB [entry] [rendered]
Date: 2019-10-24T20:29:05.957Z - Hash: 26d078b18f2d97af0d75 - Time: 2607886ms

Thanks for using the image!
Is the slowness related to the image version 8.3.12 or does it happen with an older/newer version as well?
Are you using a public GitLab CI runner? (afaik they had problems today https://gitlab.com/gitlab-com/gl-infra/production/issues/1275 and it might take a while until everything is back to normal)

Hi @everflux - Using my own runner and other jobs (NodeJS projects) are running at normal speed.

I have tried a few different image versions in the process of debugging this but chose 8.3.12 as it exactly matches my development environment.

The slow build happens with multiple versions of the image? Can you pinpoint which version it started to get slow with?
Can you reproduce it locally on your own machine or is it just on gitlab?

Hi @everflux - Sorry if I am wasting your time.

My git repository has 1 library and 7 applications. They all built in quick time on Angular 7.

I disabled all but 1 in .gitlab-ci.yml and am adding them back in one-by-one. There is obviously something in my code that is causing the compiler to run very slowly or hang. It isn't the build environment.

I really appreciate your project - thank you

Thank you for the feedback - let me know if there is anything else to help out with.
I will close this issue since it seems to be a local issue.