Base solution for your next web application
Open Closed

What is expected build time for Angular client? #10216


User avatar
0
bluescopesteel created
  • What is your product version? v10.2
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET Core

Merhaba,

We have just upgraded to ASP.NET Zero version 10.2 and overall the new version is great. Previously we were using v8.1

The new version has much slower build times for the angular client.

Our typical build time now (for v10.2) is around 30minutes.

We are using Azure DevOps to perform the build, and using the ubuntu-latest agent. The specifics about these agents can be found here: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml https://docs.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series#dsv2-series

What is the expected build time for client?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @bluescopesteel

    This slowness happens because we were building Metronic's bundles in every build. With 10.3 version, we changed scripts in package.json as shown below;

    "scripts": {
        "ng": "ng",
        "publish": "gulp build && ng build --prod",
        "start": "ng serve --host 0.0.0.0 --port 4200",
        "hmr": "gulp buildDev && ng serve --host 0.0.0.0 --port 4200 --hmr",
        "test": "gulp buildDev && ng test",
        "pree2e": "webdriver-manager update --standalone false --gecko false",
        "e2e": "gulp buildDev && protractor",
        "create-dynamic-bundles": "gulp buildDev",
        "nswag": "cd nswag/ && refresh.bat"
      },
    

    Using these commands, you just need to run yarn create-dynamic-bundles or npm run create-dynamic-bundles one time when you download the solution (Or if you change any style or script defined in angular/bundles.json file).

    After that, you need to run yarn start or npm run start and it will be faster.

  • User Avatar
    0
    bluescopesteel created

    Thanks for your very good answer, much appreciated.

    It seems that the main difference is removing the gulp buildDev command from npm run start, thus re-using the output from gulp buildDev.

    Can we also re-use the output from gulp build?

  • User Avatar
    0
    musa.demir created

    Hi @bluescopesteel If you are sure that any file references in bundles.json have not changed, you can reuse the same output.