Meteor cordova startup time?


#1

Hi,

what is startup time of your meteor cordova app? I can’t get it to less than 7-10 secs.

Thx

JM


#2

Yeah I’m in the same boat, it highly depends on your internet speed. Trying to find ways to preload more assets on initial download.


#3

Startup time for me is also around 10 seconds


#4

Did you achieved any success? Does Meteor load anything other than needed app data at the startup? If simple non-meteor cordova app can make 2-3 secs startup time, and there is no need in meteor apps to wait for app data there should be way to achieve such time too … Up to 4-5 secs from my exp is yet ok, but 7-10 in worst case i experienced 12 seconds kills new users.


#5

Not yet, I’ve been posting in the forums regarding the issues that lead up to that, but I’ve been receiving no responses at all unfortunately.


#6

Hi all, happy to see others thinking about this problem too. I’m on Meteor 1.2 and am getting 6 secs from clicking the app to splash screen going away.

Any tips on improving this time?

I know there’s lots of discussion on reducing resources loaded, using fast-render etc - but the bit I want to optimise is how long the splash screen is showing. What is within our control?


#7

The problem is that Meteor also starts a server, on Android this is very slow. I don’t have this issues with iOS. Maybe @martijnwalraven can tell you more if there will be an improvement in Meteor 1.3


#8

Well, we don’t really start a server on Android, we serve files through a web view interception mechanism. With Meteor 1.3, we did switch to a local server on iOS, and this actually makes file serving faster!

Although there is some overhead from loading the files, I suspect the problem with the splash screen has more to do with the way the launch-screen package works. Depending how you have this set up, it might wait for your data to be loaded before it goes away.

You may also want to give Meteor 1.3 a try, which could help improve mobile performance:


#9

A very useful read, thank you! Doesn’t sound like my splash screen is going to go faster any time soon (I have left my launch-screen package as default) but I’m very much looking to the performance improvements all round on Cordova. I I will be trying the beta soon. Thank you and keep up the good work!!


#10

I removed the Splash Screen with App.setPreference(‘SplashScreen’, ‘CDVSplashScreen’) in mobile-config.js and my startup time went from 11 seconds to 4.5 seconds.


#11

If it’s the splash-screen taking time, I had the same problem until I added this to my app to hide the splash screen directly when the application is ready (from http://docs.phonegap.com/en/3.3.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens_splash_screens_for_the_android_platform)

if(Meteor.isCordova){
navigator.splashscreen.hide();
}


#12

I love you. You just saved my life.


#13

Problem solved. Remove mobile-experience, then add fastclick, mobile-status-bar, and meteorhacks:fast-render. I wrote an article on doing this in detail:


#14

had tried Remove mobile-experience, then add fastclick, mobile-status-bar, and meteorhacks:fast-render
and Mobile config solution, but:

Ios app spashscreen stays 2s, is good. but android version stays for 8 seconds.


#15

No idea why this is. I will look into it.


#16

@martijnwalraven I’m just wondering if there a big differences between the Android and iOS Cordova integration? On my iPhone, the Meteor app starts super fast like a native one, but Android hangs for about 3-5 seconds on the launch screen. That’s a huge problem on slower devices where the app get’s killed if it goes to background (giving the user a bad experience if the app shows the launch screen for 5 seconds everytime they reopen it).


#17

For me, removing launch-screen package reduced the wait time on splash screen from 8-10 seconds to about 2. I still had to add a loading indicator to the app so user would not stare at a blank screen, but at least now there’s some immediate feedback instead of 10 seconds of staring at the splash screen.

Adding a spinner was very easy for me:

     html {
       height: 100%;
     }
 
     body {
       height: 100%;
       background: url(/img/spinner.gif) no-repeat;
       background-position: center;
       background-size: 64px 64px;
     }

I don’t even have to hide it manually, because when the app loads, the UI covers the spinner (I’m using ionic).


#18

Mh, I’ll try that. My logs are full of this:

MeteorWebApp: App startup timed out, reverting to last known good version

If add this to my startup.js:

console.log("Code was executed");

…I’ll see the message after 5 seconds in my console. So I don’t think that’s a launch screen issue?

Logs:

08-13 15:34:42.947 23881 23881 I MeteorWebApp: Serving asset bundle with version: aa072892adbee76978c8770e2a3f0c91aca99316
08-13 15:34:47.676 23881 23881 I chromium: [INFO:CONSOLE(3217)] "EXECUTING...",

Running on a OP 3 / Android 6


#19

I’m still having issues with this, even after removing the mobile-experience package trick.
My Android app starts up in about 8 to 10 seconds, which takes way too long.
Is there any new fix for this?


#20

Hi @wuzhuzhu,

Did you solve your issue with launch screen loading yet?
Mine is the same as your.

  • On Android it’s too slow (near 7~8s) with white screen.
  • On iOS, it shows launch screen and load fast enough (about 2s)

It’s annoyed when I look at my Android device loading the app.