Is there a plan to provide lazy loading for speed up the startup of the app? i think about wether Webpack hmr or something, using the Ng2 router thus needing to split the dist files in startup and the rest of the app, or maybe lazy loading each part of the app.
Idk a lot of lazy loading but i think this could really improve the UX by speeding up the boot time of the app.
I have noticed this too. The initial startup load time is slower than an empty ionic 1.3 project. On an old Nexus 4 i have to wait 8 seconds before the app starts (with crosswalk , sidemenu template, beta 7).
The speed after the startup is great, but the boot time really need some improvements
This is something that we have talked about internally and with the angular teams. For the most part, this is where they are focusing on improving with their offline compiler. This should decrease boot time and improve performance speed as well.
Hi @mhartington so the Angular Universal team work will help a lot in the Ionic boot time?
Aside of the rendering speed what about the startup strategies?, say webpack has sort of a lazy loading using require.ensure and chunks, i haven’t dig up that much about it though.
Also in the NgConf 2016 videos in youtube i was watching that angular also has lazy-loading in it’s router, we can’t use it because we use a LIFO stack navigation right? will it ever exists any support for lazy loading modules in Ionic?
Sorry but i don’t think this relates to the issue, i think the boot time is slow mostly because Ionic loads all at startup, which means loading modules, plugins, components and services, that’s why i suggested to look at Lazy-loading components, and yes, Angular Universal will help a lot when implemented.
Interesting, i see you have an App Shell working and a very small size bundle, i’m curious to see how did you made that, using Browserify as recomended by Ionic staff? or maybe Webpack?
My current bundle has 5.5 Mb without minifying and after minification and other processes i can lower it to 2 Mb, maybe i’m importing more than really needed?
hey @eugenet taking a better look at your downloadJSAtOnload() func, i realize it isn’t exactly what i meant with lazy loading, i meant that pages or routes are loaded on demand, say the Login page is the firs one and all deps are loaded to be able to load it, however after that home page is loaded when logged and thus the images, deps and the page and subcomponents themselves are loaded with the Home page, not with the Login page nor app load.
You’re just loading the deps async, so the onLoad event finishes faster but the overall time shouldn’t change that much.
use loading page
use ServiceWorkers
divide bundle to vendor and app code (to cache vendor.js)
embed templates in js code, no separate server request to HTML template
hi, can u explain a bit about use loading page , what do u mean by that ?
also , what service workers to use !
can you provide a link to explain more regarding dividing bundle!