Open rollermy opened 7 years ago
I'm sure there's a bunch of things that could be done to improve first-load, but it hasn't been at the top of my priority list. I'd be happy to look over any PRs if you find some good solutions.
Did you run it in development environment? My app.js is also 2-3MB in dev env. However in production env it's usually < 1MB (probably even smaller after gziped), since all the comments and debug stuff are thrown out and it also gets minified.
Is it possible to use Server-Side pre-rendering with to solve this?
I've heard it has been pretty successful with react and angular2 projects to solve the first time page load time issue
AHHHH Never mind, the CANARY branch has server side rendering....
I look forward to using the trying out the angular 4 generator too. A new install does have smaller files. But the app + vendor + polyfill is still ~800kb before adding anything and without gzip. I guess it could be smaller without bootstrap.
I found something that might help you.
Check your webpack.make.js
and search for
new webpack.optimize.UglifyJsPlugin({
mangle: true,
...
})
If the mangle option is set to false
, set it to true
. This should reduce the app.js file size.
How can i improve first page load speed? The biggest file is the app.js at about 2.5mb. I have this gziped down to ~500k which is still pretty big. On a normal 3G connection it still taken 4-5 seconds to load the first time. Is this to be expected? Or am i missing something? Are there some tools or configurations that will work well with angular-fullstack that can help speed this up? Thanks!