Aspnetcore-angular-universal: This template is very slow at compilation

Created on 24 Apr 2017  路  5Comments  路  Source: TrilonIO/aspnetcore-angular-universal

This template is 100 times slower than the one generated with yeoman with Angular2. It takes like 30 seconds to build(and sometimes I even get a timeout) while the template generated with aspnetcore-spa takes only 1-2 seconds.

Build system enhancement

Most helpful comment

I'll try to tackle this one tomorrow, moving this week. Should of fixed it in the first place sorry guys!

All 5 comments

The very slow loading / building is definitely from the first-time load.
If you're opening it in VS2017 let's say for the first time and hitting F5, it takes quite a while for that first webpack run to happen. When downloading with the yeoman generator, it actually runs the webpack vendor & webpack configs automatically. These are things I'll definitely add back in here, for now the webpack configuration is fairly basic, it needs a few improvements no doubt!

The timeout or error can happen because during that same load it hasn't finished compiling yet.
Usually this build process is quicker on further project startups (F5 etc)

Another thing is that on the first (sometimes second run) in development mode, it's actually compiling your app & NgModule from JIT into an AoT ngModuleFactory, so this can take a few seconds as well. You'll notice after words it speeds up tremendously since this then gets cached. The Server rendering only handles AoT, that's why it's doing this.

There's no doubt some improvements that can and will be made, I'm just moving this week so it'll be tough to get them all in, but they'll be in there and we'll be much faster soon enough!

I'll definitely get some sort of auto webpack builds in with a yeoman template or dotnet template once I publish there (when everything is more polished).

As always PRs are appreciated with any improvements :)

This is my experience also (very slow) - and I haven't had a chance to look at it as I'm trying to create an application with it :-).

image

I am also seeing excessively long webpack builds and hot updates don't seem to work for the most part. Getting the same errors as @TimHarker. Also, I seem to get multiple webpack rebuilds when I make changes?

I'll try to tackle this one tomorrow, moving this week. Should of fixed it in the first place sorry guys!

I'm also getting brutally slow AOT compiles (i.e. like 16-20 minute compile times!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ccaymaz picture ccaymaz  路  3Comments

ketrex2 picture ketrex2  路  4Comments

MapleYe picture MapleYe  路  3Comments

consigliory picture consigliory  路  3Comments

artyom-p picture artyom-p  路  3Comments