Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

NG SERVE very slow #5330


User avatar
0
Ricavir created

Hi,

I've upgraded my existing project from v5.1 to v5.5.

Webpack build is very long the first time ; it takes more than 5 minutes to finish building when arriving at : "92% after chunk asset optimization SourceMapDevToolPlugin main.js generate SourceMap"

Before upgrading my project, building was very fast (less then 50s for sure)

I tried to reinstall node but same problem.

DO you have any idea to solve this ?


9 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    Hi,

    updating to 6.0.1 seems to improve speed see <a class="postlink" href="https://github.com/angular/angular-cli/releases">https://github.com/angular/angular-cli/releases</a>

    See <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1142">https://github.com/aspnetzero/aspnet-ze ... ssues/1142</a>

  • User Avatar
    0
    Ricavir created

    @alper, my current version is 6.0.4

    As you can see here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1142">https://github.com/aspnetzero/aspnet-ze ... ssues/1142</a> I need to wait 6/7 min to build the entire project. Long time waiting at this step : 92% after chunk asset optimization SourceMapDevToolPlugin main.js generate SourceMap

    [attachment=0:1a8bsdhi]Capture.PNG[/attachment:1a8bsdhi]

  • User Avatar
    0
    alirizaadiyahsi created

    What about if you start project without HMR mode?

  • User Avatar
    0
    Ricavir created

    It is the same time with or without HMR.

    All my modules are rebuilt very fast, but when I changed something in the shared module (app/shared/common), it takes for every change arround 6 minutes to rebuild !

    I have to find a solution, we can't work like that...

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you try this and see if it makes any difference <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1222#issuecomment-393608255">https://github.com/aspnetzero/aspnet-ze ... -393608255</a> ?

  • User Avatar
    0
    Ricavir created

    @ismcagdas : thank you, deactivating sourcemap helps and solves the problem partially. I can't debug TS files but builds are very fast. Hope this will be fixed for next releases (must be an angular cli bugg...)

  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir I think our base solution (AspNet Zero) doesn't contain as much ts files as your solution. Probably because of that we don't face this problem.

    If you can share your solution with <a href="mailto:[email protected]">[email protected]</a> (if possible of course), we can try to reproduce and understand if the problem is related to AspNet Zero or angular-cli.

  • User Avatar
    0
    Ricavir created

    @ismcagdas I quite sure that this is linked with angular cli.

    <a class="postlink" href="https://github.com/angular/angular-cli/issues/5775">https://github.com/angular/angular-cli/issues/5775</a>

    I've been upgrading my aspnetzero project for a while now. I already had this kind of issue with angular 4 (if I remember well...) and this problem went gone after an angular update.

    Actualy, deactivating sourcemap allows me to continue development like I did before. Hope that nexts angular updates will fix this.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir yes angular-cli caused similar problems in the past as well. I hope that there will be a improvement in the upcoming releases.