5

Findings

  • My app takes about 20 seconds to load on first run* with crosswalk present
  • My app takes about 12 seconds to load on first run* with crosswalk removed
  • My app takes about 5 seconds to load on subsequent runs with or without crosswalk (even after fully closing)

*First run and clearing local data appears to have the same results

Cordova cache assumption

I think Cordova builds a cache on the first run

  • Looks like about 30MB after first run if Crosswalk is present
  • Looks like about 3MB after first run if Crosswalk is not present

Questions

  1. Is my 'Cordova cache assumption' correct?
  2. Is there anything I can do about this to improve 'first run' load times?

Build / testing environment

  • Meteor 1.3.4.1
  • launch-screen package removed (As discussed in Meteor Forums)
  • crosswalk package included / excluded (though I'd much prefer to include Crosswalk for compatability)
  • Nexus 5 running Android 4.4.2
Anthony Astige
  • 1,919
  • 1
  • 13
  • 18
  • Might be of interest: https://stackoverflow.com/questions/37896070/decrease-loading-time-from-coldstart-in-cordova-ionic/37906054#37906054 – Phonolog Jun 28 '16 at 17:29

1 Answers1

0

Host your application in a CDN:

http://joshowens.me/using-a-cdn-with-your-production-meteor-app/

Based on your stats, where the decrease is from 20-12 seconds to 5 seconds, you're spending most of your time downloading content, regardless of which WebView is used.

Naturally, if Crosswalk is that slow on load and startup time is important to you, don't use it. The amount of engineering you'd need to do to "fix" Crosswalk looks to be pretty involved.

Usually, for mobile Meteor apps on fast wi-fi, the biggest bottleneck becomes parsing Javascript. You could look into Meteor's dynamic loading features in 1.5 to address that:

https://blog.meteor.com/dynamic-imports-in-meteor-1-5-c6130419c3cd

DoctorPangloss
  • 2,994
  • 1
  • 18
  • 22