ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.61k stars 13.51k forks source link

Speed up initial loading #6776

Closed TheMohanraj closed 7 years ago

TheMohanraj commented 8 years ago

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?

savanvadalia commented 7 years ago

@danbucholtz I managed to solve the run time error myself, it was related to angular barrels. I had to reference the modules with complete path in the app.module.ts file. Don't know why it started failing with the newer script version though!!

However, after fixing the error and running ionic run android --prod --release on my Samsung Galaxy S4 Android Version 5.0.1 the initial load is still 7-8 seconds. There is No change in the initial at all after updating it to the latest ionic-app-scripts versions.

We really need to improve upon the inital load time. I personally don't think the phone and Android version I am using is relatively that old to have that much slow boot time. I would be happy somewhere between 3-4 seconds boot time on old-mid range phones.


@graphefruit, I did 2 steps not mentioned in the release procedure 1) I manually modified package.json file to change script version to 0.0.47 and then run npm install. 2) I also removed .tmp directory which is not valid with new build process as per the release notes.

Apart from this I just followed the release procedure.

danbucholtz commented 7 years ago

Are you running the latest ionic cli? Can you verify? npm install -g ionic@latest.

Can you run npm run ionic:build --aot and verify that ngc is run in the terminal? When you run ionic run android --prod --release do you see ngc in the terminal?

Thanks, Dan

graphefruit commented 7 years ago

Hello @danbucholtz,

yes I see ngc when running--prod --release. Also I installed ionic@latest more then 4 times ;) via cmd without any errors - maybe we need to change some settings in the package.json - they weren't upgrade on their own. Also I've installed the nightly to maybe see some difference.

The other command I can try to run tomorrow morning.

Greetings Graphefruit

savanvadalia commented 7 years ago

@danbucholtz

Yes, I am using the latest ionic-cli (Please see my workspace environment info at the end) I also see the ngc in the terminal in both cases you mentioned please see screenshot for each of them 1) npm run ionic:build --aot 2) ionic run android --prod --release

1) Aot build image

2) Production build while running on device

image

Still no difference in the initial load times for me which 7-8 seconds 😞 😞

cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed
trakhimenok commented 7 years ago

@savanvadalia long loading time could be specific to your app. It would help if you try & provide numbers for a starter app or ionic-conference app so numbers are comparable.

Also it make sense to upgrade to ionic-angular RC4.

graphefruit commented 7 years ago

@danbucholtz Care, this post will be a bit longer:

My/Custom project

npm run ionic:build --aot image

ionic run android --prod --release image

ionic build android --prod --release image

Still 10 seconds loading time.

Starter-App

@astec After you've asked, I've installed the starter app. And made the same here.

  1. npm install -g ionic@latest
  2. ionic start o5 --v2
  3. ionic info
    
    Your system information:

Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.17 Ionic App Lib Version: 2.1.7 Ionic App Scripts Version: 0.0.47 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 8.1 Node Version: v6.9.1 Xcode version: Not installed

4. `ionic platform add android`
5. `npm run ionic:build --aot` 
![image](https://cloud.githubusercontent.com/assets/6260244/21260954/df494256-c388-11e6-83e1-41b33885c628.png)
6. `ionic run android --prod --release`
![image](https://cloud.githubusercontent.com/assets/6260244/21260992/1746917c-c389-11e6-88ed-9d3194c0d8fa.png)

7. Times:
7.1 Note 1 - Android 4.1  - The starter project took about 5 to 5.5seconds
7.2. Note 2 - Android 7.0 (CM14) - The starter project took about 5.5 to 6.5 seconds

## Conference - App

So next try for I've downloaded the starter app: https://github.com/driftyco/ionic-conference-app

1. `npm install`
2. `ionic info`
![image](https://cloud.githubusercontent.com/assets/6260244/21261974/fd85083a-c38e-11e6-87d9-3e01d0900b1d.png)

-> Looks like this one is not on rc.4, cause of this 
3. I changed the package.json like mentioned in changelog.

"dependencies": { "@angular/common": "2.2.1", "@angular/compiler": "2.2.1", "@angular/compiler-cli": "2.2.1", "@angular/core": "2.2.1", "@angular/forms": "2.2.1", "@angular/http": "2.2.1", "@angular/platform-browser": "2.2.1", "@angular/platform-browser-dynamic": "2.2.1", "@angular/platform-server": "2.2.1", "@ionic/storage": "1.1.6", "ionic-angular": "2.0.0-rc.4", "ionic-native": "2.2.11", "ionicons": "3.0.0", "rxjs": "5.0.0-beta.12", "zone.js": "0.6.26" }, "devDependencies": { "@ionic/app-scripts": "0.0.47", "typescript": "2.0.9" }


4. deleted `node_modules`
5. `npm install`
6. `ionic info`
![image](https://cloud.githubusercontent.com/assets/6260244/21262110/c8187690-c38f-11e6-97e5-fa1c2e6f769c.png)
7. `ionic platform add android`
8. `npm run ionic:build --aot`
![image](https://cloud.githubusercontent.com/assets/6260244/21262181/2505d9ec-c390-11e6-8c6a-cfd40c028e34.png)
9. `ionic run android --prod --release`
![image](https://cloud.githubusercontent.com/assets/6260244/21262213/679e4d48-c390-11e6-8186-5b4a4655f9fe.png)
10. `ionic build android --prod --release`
![image](https://cloud.githubusercontent.com/assets/6260244/21262350/2f40e216-c391-11e6-8332-3beca13c4a23.png)
11. Startup times
11.1 Note 1 - Android 4.1 - 7- 8s
11.2 Note 2 - Android 7 (CM 14) - 7 - 8.5 s

The time was measured by "click on app icon" till the screen appeared with content 
So even the conference-app with the latest release needs 7-8 seconds, so it isn't a custom-release project.
Even so the conference-app is still realy small with no big internet activity, or html-5 filesystem.

Hope this helps.
Greetings 
Graphefruit 
danbucholtz commented 7 years ago

@jgw96, can you weigh in on the above? Justin is our resident Android expert. My initial thought is those are really old (7 generation) old phones and that could play a factor, but I will defer to Justin.

Thanks, Dan

Kobzol commented 7 years ago

FWIW I have Sony Compact Z3, which is not really that old and the times are pretty much the same on Android 6.x.

graphefruit commented 7 years ago

@jgw96 @danbucholtz I've installed it now on my Google Pixel aswell - startup time of the conference app - took 3.5 to 4 seconds. Fun fact: I've had 10 times startup times to 8-10 seconds - then I removed and installed the app again, and the time went down to 3.5 to 4 seconds again.

mpaland commented 7 years ago

@graphefruit yeah, but reinstalling can't be the right way. ;-) Interesting (profiling) would be, were so much time is spent on and how fast other (angular) frameworks (Ionic 1, OnsenUI etc.) start a simple "hello world" app on the very same device. Startup time of the RC4 conf app on my (not too old ) Moto G2 is about 6 sec :-/

graphefruit commented 7 years ago

@mpaland Thats true, it won't be the right way, but sometimes providing all information you found is the best way and hope ionic can use them. Like I mentioned in some posts earlier - I'm porting my Ionic1 app to Ionic2, there was a startup time from 3 to max 4 secs. The ported project takes 7-8 seconds on the same device.

HTC One M8 (Android 6.0 - Vanilla)

So after your suggestion I've installed an Ionic1 project:

  1. ionic start myproject
  2. ionic platform add android
  3. ionic build android
  4. Ionic1 - Startime on HTC One M8 (Android 6.0) was about 2.5 seconds.
  5. Ionic 2 - Conference App - Start time: 5 seconds
  6. Ionic 2- Starter App - Startime: 4 seconds
  7. Ionic 1 - My custom project: 4 seconds
  8. Ionic2 - My custom project: 7 sec.

    Shock! - Ignore this sentence.

So even with the starter app in ionic 2 the difference is still about 1.5 seonds The HTC One M8 was released 2014 March

Moto G (Android 5.1)

So and here we go with an next device - Moto G - Android 5.1.

  1. Ionic1 - 4.5 to 5.5 sec sec
  2. Ionic 2- Conference app: 8.5 to 10.5 sec
  3. Ionic 2 - Starter app: 6 to 6.5 sec
  4. Ionic 1 - My custom project - 5.5 - 6 sec
  5. Ionic 2 - My custom project - 7-8 sec.

So as you see, we've still 1.5 sec difference, the conference app needed a lot more time The Moto G was released 2013 November

So I think that should answer all questions now.

And yes: Every project in ionic2 was compiled with RC4 and appscripts 0.0.47 - before anyone asks

danbucholtz commented 7 years ago

Are you using the latest Ionic CLI? How big is your bundle? Can you compile it with just npm run ionic:build --aot and verify that platformBrowserDynamic is NOT in there? --aot should skip minification but still give you the AoT build.

Thanks, Dan

graphefruit commented 7 years ago

@danbucholtz I'll check it and give you update in 15 minutes... - Maybe I've made a mistakes, to much compiles in the last 2 hours for this post =/ sorry

danbucholtz commented 7 years ago

Keep in mind that platformBrowserDynamic has to basically run ngc in the browser when the app starts. Ultimately whether you're doing AoT or not, you're still using .ngfactory.js` files in the browser. It takes about ~20 seconds in your previous posts. So 20 seconds of compiling in the browser + 5 seconds start-up = long time.

5 seconds is still really long. Something is not quite right there.

Thanks, Dan

graphefruit commented 7 years ago

@danbucholtz Hello again dan! I'm sorry. I've installed the latest scripts, but the npm run ionic:build --aot wasn't avaiable on my custom project. - I've already updated my post on top.

So I've created a new project now, compiled and signed, and now the startup time is back to 7 seconds.

I like to mention that all other checks - conference/starter app were all with the ionic:build --aot and I can verify that platformBrowserDynamic is NOT there. I've extracted all ZIPS and had a look into main.js.

Sorry again.

savanvadalia commented 7 years ago

@graphefruit great effort for producing such stats on variety of devices 👍 @danbucholtz @jgw96, how abt Ionic Team releases production version of ionic-conference-app on play store and we can download provide you some stats on initial load.

If our load times don't match then possibly we are doing something wrong with our build which i really doubt is the case.

Kobzol commented 7 years ago

@danbucholtz It's been like this since RC.0, I doubt that anyone has been able to get startup under 5 seconds on Android. Ionic 1 startup times are better than Ionic 2.

Could you please look into it and do some profiling? I know that you're first trying to make sure that we are using the correct procedure to build the app, but this issue hadn't moved much in the last months and when multiple users are reporting this it probably won't be caused by a bad usage of the build script. Five (and that's the best case scenario here) or more seconds to start is a show-stopper for pretty much any Android app.

My statistics: Sony Z3 Compact Android 6.0.1 - AOT/prod/minified build (2 MiB JS bundle) takes 6 seconds to start both with and without Crosswalk. On slower devices it takes much more time (10 and more seconds were reported by users that tested my app).

rob3c commented 7 years ago

@danbucholtz Would you mind sharing your team's device testing setup with us? It's unclear why you're not experiencing the same startup delays that the rest of us seem to be.

mlynch commented 7 years ago

Hey everyone, thank you so much for the detailed diagnostics and testing info. This is our #1 priority right now, and while some of us here aren't seeing some of the long load times, others are depending on the device/OS/etc. We're narrowing it down, any extra info you have is always welcome.

alexbainbridge commented 7 years ago

@mlynch While this is not the missing 5 seconds, it could, maybe, be some time worth saving

https://github.com/driftyco/ionic-storage/issues/54

I have a gut feeling that one of the ionic libraries (storage) is initialising twice..... (rather than once). I could be very wrong, but still, while hunting for startup performance gains, throwing this up for consideration, especially if there is a wider issue here

graphefruit commented 7 years ago

Hello, I've tested another device:

Nexus 7 (2012) - Android 4.1

Ionic 1 - Starter-App: 4 sec Ionic 2- Conference app: 7 sec Ionic 2 - Starter app: 5.5 sec Ionic 1 - My custom project - 5.5 sec Ionic 2 - My custom project - 8.5 sec

Maybe I can provide this evening another test from an Ulefone-Metal with Android 6.0.

Greetings Graphefruit

PrithiviRajG commented 7 years ago

After upgrading Ionic to 2.1.17 and running ionic run android --prod significantly improved the performance and my app is starting within 2 to 3 seconds. Don't know what has been changed but I am very happy of it. :smiley:

graphefruit commented 7 years ago

@PrithiviRajG Could you please share some more information?

  1. How big is your app?
  2. ionic info - Information
  3. package.json - Information
  4. installed plugins / 3rd-party libraries
  5. Which device are you using?
  6. Can you also test it with the starter-app and ionic conference app ? Thanks in advance Graphefruit
PrithiviRajG commented 7 years ago

@graphefruit

  1. My Apk size is 7MB, size of WWW folder is 7.88MB, plugins folder is 67.1 MB, resources folder is 1.01 MB
  2. ionic info
 ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.39
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.7.0
Xcode version: Not installed
  1. package.json
    
    {
    "name": "ionic-app-base",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
    },
    "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/cloud-angular": "0.5.2",
    "@ionic/storage": "1.1.6",
    "angular2-swing": "^0.10.0",
    "ionic-angular": "2.0.0-rc.2",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.21"
    },
    "devDependencies": {
    "@ionic/app-scripts": "0.0.39",
    "typescript": "2.0.3"
    }
    }

4. Installed plugins

cordova-plugin-console cordova-plugin-device cordova-plugin-facebook4 cordova-plugin-googleplus cordova-plugin-nativeaudio cordova-plugin-splashscreen cordova-plugin-statusbar cordova-plugin-whitelist ionic-plugin-keyboard angular2-swing



 5. Device Information: MOTO G 1st Generation - Android 5.1

6.  will test the start up app and ionic conference shortly and let you know.
graphefruit commented 7 years ago

@PrithiviRajG Thanks for your information. it looks like you're not on the latest:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.39
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.7.0
Xcode version: Not installed

-> You're using RC2 not RC4 - also the ionic scripts are now on 0.0.47.

But maybe this is an indication for @jgw96 ?

graphefruit commented 7 years ago

Hello, I've tested another device:

Ulefone Metal (Android 6.0)

Ionic 1 - Starter-App: 3.5 sec Ionic 2- Conference app: 5 sec Ionic 2 - Starter app: 4.5 - 4.7 sec Ionic 1 - My custom project - 5 sec Ionic 2 - My custom project - 7 sec

Greetings Graphefruit

savanvadalia commented 7 years ago

@mlynch Out of curiosity just want to know that the improving initial load time, will it be fixed part of @danbucholtz current work on tree-shaking OR this will be separate Android specific fix?

I came to know about Dan's work from meeting notes, love working with you guys. Can't believe how much transparent the team is with framework work. :heart:

danbucholtz commented 7 years ago

@savanvadalia,

We will never be done trying to make Ionic faster.

Right now we are focused on getting proper tree shaking working and getting closure compiler support. Closure can produce significantly smaller JS bundles than the alternatives resulting in faster load times. We also are investigating code splitting right now to reduce the amount of time needed to load and parse the javascript.

Thanks, Dan

time4Wiley commented 7 years ago

@danbucholtz Great to hear this. How can I contribute to the getting-faster features?

I am currently evaluating front-end and mobile technologies for new long-term product lines in the consumer Finance area. Initial loading performance is an essential decision factor.

From recent testing of small-scale app, the iOS/Android performance is acceptable. Browser loading performance is kind of OK too: I will introduce Server Side Rendering later. The most concern lies in the initial loading performance when we start to introduce more pages and third-party modules.

theunreal commented 7 years ago

Is there any way to show a splash screen or any progress in the inital loading of the Ionic2/Webview app?

They avg. time the app takes to load for me is about 10 seconds. This makes bad user experience when people have to wait about 10 seconds just to load the app. My app isn't big though.

mattlin4567 commented 7 years ago

I use npm run ionic:build --aot and ionic run android --prod to run on device, and the initial time of starter app is about 2 second, but when I use my own project, it comes

Uncaught Error: Cannot find module "./app.module.ngfactory"

I have removed node_modules and www, but it doesn't work. when I just run ionic run android, my project works but the initial time is about 7-8 seconds

here is my ionic info

Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.48 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 10 Node Version: v6.6.0 Xcode version: Not installed

update solved problem by downgrade typescript to "2.0.9"

barocsi commented 7 years ago

Whatever I do, deviceready fires after 5 seconds.

danbucholtz commented 7 years ago

All,

To give an update, we have made significant improvements to the framework itself to improve tree shaking and dead code removal. We have been experimenting with code splitting and closure compiler and have dramatically reduced the bundle size in those cases. Experimenting is the key word and it'll be a bit before we have anything ready for prime time. We are working very closely with the Angular team on this topic.

Closure Compiler is an amazing tool but it can break many 3rd party libs or even your own app if you don't follow the rules, so we're working on creating a simple yet robust and flexible developer experience around this.

Shrinking the bundle size, code splitting and improving launch speed is our #1 priority.

Thanks, Dan

naveedahmed1 commented 7 years ago

@danbucholtz thats great! I suggested closure compiler to Angular CLI team in past. May be a switch could be introduced making compilation using closure compiler optional. Those who have closure compiler friendly code that can enabled it, rest can compile it in a standard way. Ionic team could make sure core Ionic library and Ionic native is fully compatible with closure compiler. BTW would you like to share whats the best launch speed you are able to achieve with/out closure compiler?

barocsi commented 7 years ago

http://hybridtonative.com, NativeScript is still immature, however it is getting more and more attractive as Ionic issues keep coming, open tickets persisting or growing and webview technology is just spinning around itself, forcing developers work on the technology instead of working with it. Even basic tasks demand huge amount of workarounds, issue digging, requiring a lot of code updating, following changes and updates leaving producion on a muddy base of never ending polishing which is actually bug fixing of bad design choices fixing other bad design choices. At the end of the day we are paying the price and its getting comparable to developing apps natively on both iOS and Android.

dylanvdmerwe commented 7 years ago

@barocsi hyperbole much? You do realize Angular 2 and ionic are on the cutting edge of the tech they're working with and they are working on finding the best possible course of action for us developers? Also keep in mind that v2 stable has not been released yet.

graphefruit commented 7 years ago

@barocsi If you're not glad with Ionic2 use Ionic1 or write your own angular application. Even with your own angular application you gonna stumble across many issues which ionic solving in their framework already. Also this framework is open source and you can contribute; if you got any problems with the speed they're working on it, or you could fork it and create your own ionic2-fork. I don't want to argue or break something from the fence, even if Ionic2 has a release candidate it just came out from the beta release cyclus. So please give it some time, and if you cant wait take ionic1 and use crosswalk, which has already set some years in this market

barocsi commented 7 years ago

Thanks for the suggestions, I am wondering around alternatives for current and future decisions. We already have some robust and heavy Ionic V1 and V2 apps along with and almost 1.5 years of struggling and contributing with issues all over this github repo. Even though this is a pro-ionic thread we must anticipate where this technology is heading, even is something is tagged as cutting edge by @dylanvdmerwe it does not mean it will be subject to persistence by the community and must be honestly evaluated treated with patience as we do, this thread is almost 6 months old, still dealing with an essential and production critical problem.

graphefruit commented 7 years ago

I can understand your concerns, thats why I used plain angularjs within my own heavy application. The problem is, that I still stumbled across many issues, because if you're not writing everything yourself or from scratch you'll get there sooner or later. I had big problems with Angular-Material V1 (performance e.g.) and I needed to dig into the framework myself, the rest was written myself in angularjs. But even there I came to the point where performance issues popped up. So I needed to spent time on my "own" framework to find and try to fix them. So I can understand Ionic with their problems, because I fell in these problems myself. Even if they are a big/bigger company they also have limited resources.

The next thing is that Ionic2 isn't just an APP, it also provides a website, it also supports UWP (and thats a lot of pain) and also it supports PWA. So many new features in one framework, that is mostly used for Apps, but supports many other things aswell. With this features there comes a lot of dependencies and much problems when digging into them. But you're concerns are eligible, but I rather see the problems in the complete new technology which was thrown on the market and Ionic tries to grab into them and gets a lot of dependencies with it.

philrob commented 7 years ago

@danbucholtz

Dan, extremely encouraged by your comments re 'experimenting' on code splitting, closure compiler, tree shaking and that launch speed is the current #1 priority for ionic2 (4th Jan). The example ionic2 conference app off Github is a good simple benchmark app that all can use to compare your progress. Hope your work progresses well (and rapidly). Really need a startup time of <=3 secs these days or users are likely to 'go away' - over 6 secs and they definitely 'go away' for good.

Built using --prod and launched on my Nexus 7 (2013) Android 6.0.1 the conference app is currently taking ~8 secs to launch (average timed by stop watch over several launches).

So, still quite a way to go, here's wishing you every success !!! - especially as I really like the structure and facilities provided by ionic2 from an experienced developer's point of view.

Phil

mpaland commented 7 years ago

@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...

graphefruit commented 7 years ago

@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:

  1. index.html
  2. min.css
  3. min.js

And thats it.

Did you already accomplished such a fast loadtime with cordova (angular,etc)?

mpaland commented 7 years ago

@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.

philrob commented 7 years ago

@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.

lordgreg commented 7 years ago

@philrob Extremely curious which other Hybrid Framework + Cordova (incl. everything you would need for your project) brings you under 3 seconds. Please do tell.

philrob commented 7 years ago

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.

dutchview-shreesha commented 7 years ago

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

lordgreg commented 7 years ago

@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.

PrithiviRajG commented 7 years ago

@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

philrob commented 7 years ago

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 ...