Speed up initial loading
We're developing an app which is partially native and partially hybrid. We will open cordova activity when user clicks on an menu item and finish the activity when user clicks back. Problem with this approach is, it takes a while to render on the screen for first time. We are hosting all the resource files in the assets folder so caching doesn't make much sense. Is there any progressive way to load the application?
@barocsi I can understand your situation and in the moment it's really very disappointing for me as well. To sum it up: My app project must run on Android, iOS and Win10 (desktop) and needs to start quickly, 2 sec are max - even on older (means 2 year) devices. I want to write in JS and HTML, due to a lot of libs and experience. This narrows down the field to WebView apps instead of native (Java, Obj C) ones. I need certain HW access, so Cordova is a good choice. NativeScript, Appcelerator, OnsenUI w/o ng2 ... may be, but I don't like the idea at all.
In the moment I blame ng2 for this huge code size and I'm not sure if proper treeshaking and closure compiler will reduce the startup time significantly (factor 4-5 necessary) on a bigger project. We need to wait and see...
@mpaland Have you already used Ionic1? I realy would like to see how you get a 2 sec startup time - even on older devices. My custom project without ionic1 need also a startup time of about 3 seconds and here I go with:
- index.html
- min.css
- min.js
And thats it.
Did you already accomplished such a fast loadtime with cordova (angular,etc)?
@graphefruit , no I didn't try Ionic 1 and I haven't tried anything else yet, cause I found Ionic 2 best suited for my project. As I said, I'm just evaluating the different options. A WebView with JS is IMHO still my best option. So I'm looking forward for the ng and ionic team making progress.
@graphefruit I really hope ionic2 does finally achieve a <=3 secs startup, even on older devices. I can already achieve that with another hybrid framework + cordova 'out of the box'. However, I would much prefer to use ionic2 as it has a such good pedigree being built on angular2, which in turn, gives it great support, documentation, facilities, etc - all the things an experienced developer like myself values highly.
@philrob Extremely curious which other Hybrid Framework + Cordova (incl. everything you would need for your project) brings you under 3 seconds. Please do tell.
lordgreg Not really an appropriate place for introducing other frameworks. I just am hoping that the ionic2 team can achieve a significant reduction in launch time that brings it closer to my aspiration of <=3 secs.
Hi My ionic2 application takes still 10 sec to launch.but ionic1 application takes only 4 sec.how to improve the initial loading time.please suggest me.this is very critical
@philrob Seriously, checking other comments, you would fast notice there's always comparisons. Heck, even this thread has them. What you are stating is not a lie, but explaining that your hybrid app which runs nothing more than jQuery (example) inside Cordova container opens in less than 3 seconds is total absurd. Using the framework which doesn't handle styling or is not at least so complex as Ionic is, or it doesn't rely on any other huge library (angular2) is like comparing night & day. It doesn't make sense.
@mobinius-shreesha run the project as ionic build android --prod or ionic run android --prod to get the launch time as 5 seconds. running in debug mode ionic run android will increase the time to more than 10 seconds
lordgreg
Don't think we disagree. That's why I deliberately chose to use ionic2's conference app from Github (built with --prod) to give my launch timing (~8 secs) specifically for my Nexus 7 (2013) Android 6.0.1. Clearly if another framework can achieve a faster launch time on the same equipment and still provide the facilities I need (including styled UI mobile widgets) then FOR ME its relevant,
I REPEAT - I like really ionic2 for all the other important reasons I gave before, just want to see the launch speed significantly improved. Think we need to give the ionic2 team the time they need ...
I also look forward for increasing boot time.
I think the Ionic team has done an awesome job with their release of v1 of ionic-app-scripts last week. This improved build time massively here in my environment.
I am sure they will do the same with app boot time.
I think the problem lies elsewhere: ionic v2 is in rc state. That is what most developers must respect, however: on the Ionic team side ionic documentation suggests for any newcomer that v2 is something that is production ready. Do not object it is the case. Even the docs are now defaulting to v2.
This deceptive behavior from the team voluntary or not is kind of the result from the pressure from the industry. Ionics sole durvival depends on laying out something advanced that has a large dev base (js+angular2) before the community switches to a different emerging cross platform technology, for example the one mentioned by me before: Nativescript
So the Ionic teem must suggest v2 is the de facto version for Ionic. But the price tag can be higher in this case: rolling out a product with critical parts in errors with no asap fixes yields to distrust from the community that is sometimes more dangerous than waiting a couple of months more before positioning the product as a cutting edge mature major upgrade.
Developers must produce and each step back or lack of fixes will make them turn to other solutions to hedge their own future and stability towards their clients.
Any updates on this? :)
@PrithiviRajG Thanks for your answer.i am able launch the app within 10 sec.but is there any updates on ionic2 to improve booting time.when they are planning to release full version of ionic2.do you have any idea.
14.99 seconds cold boot with the current plugins installed and current ionic version:
com-badrit-base64 0.2.0 "Base64" com.synconset.imagepicker 2.1.7 "ImagePicker" cordova-plugin-camera 2.3.1 "Camera" cordova-plugin-compat 1.1.0 "Compat" cordova-plugin-console 1.0.5 "Console" cordova-plugin-device 1.1.4 "Device" cordova-plugin-dialogs 1.3.1 "Notification" cordova-plugin-nativestorage 2.2.0 "NativeStorage" cordova-plugin-secure-storage 2.6.3 "SecureStorage" cordova-plugin-spinner-dialog 1.3.1 "SpinnerDialog" cordova-plugin-splashscreen 4.0.1 "Splashscreen" cordova-plugin-statusbar 2.2.1 "StatusBar" cordova-plugin-whitelist 1.3.1 "Whitelist" ionic-plugin-keyboard 2.2.1 "Keyboard"
Your system information:
Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.1 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.48 ios-deploy version: 1.9.0 ios-sim version: Not installed OS: macOS Sierra Node Version: v6.9.2 Xcode version: Xcode 8.2.1 Build version 8C1002
@tryadelion current ionic version is rc4, not rc1.
Everyone, let's wait for RC5 or release as there should be a lot of changes regards this.
how do i force an ionic update to rc4? is there any other outdated thing that might be causing my delay?
For me a complex project in ionic v1 was 1.8MB build.js, with v2 a basic project main.js goes up over 6.7MB. Adding or removing cordova plugins not neccessarily affecting boot time.
Hi everyone! We're going to close this issue and lock the thread for now. At this point, we've been doing a lot of work on improving load times, framework speed, and making it work everywhere.
This is always going to be a moving target, and something we constantly think about. While this issue at first was helpful, it has since derailed and is no longer a clear issue to follow. If you have any other issues, please open a new one, with all the information that we ask for.