Android performance drastically worse

My Ionic 3 app runs very well on iOS. It is smooth and responsive with no delays in retrieving and displaying data. However, Android is drastically different. The main difference is when the app gets user location and retrieves data from Firebase database based on user location.

APP FUNCTIONALITY:

The app employs geofire to retrieve nearby locations, then retrieves more data from another table, combines with geofire’s location data, sorts the data based on distance to user, saves it into an array, the HTML iterates over array using <ion-list [virtualscroll]> to show a list. I use the diagnostic plugin, geolocation plugin, angularfire2, firebase javascript sdk, and geofire for this process. To test, I build the app using ionic cordova build ios --release --prod OR ionic cordova build android --release --prod. I test on an iPhone 7 and Samsung G9.

ANDROID PERFORMANCE PITFALL:

The data created according the process described above shows in less than a second on the iOS app but in Android it is delayed for more than 5 seconds.

I installed crosswalk based on Github instructions but when I build the app I get an error message in Android studio: “AAPT2 error: check logs for details.” Crosswalk is no longer updated and no more bug fixes coming.

To be honest, the difference between iOS and Android is so significant that I am surprised how Ionic can claim to be an effective crossplatform solution. If I cannot solve this issue, I will have to change the Android app drastically to accommodate these limitations. Android version will be worse than the iOS version with limited functionality and poor user experience.

With crosswalk out of the picture and not working how to improve performance on Android? What could be the main difference between iOS and Android causing this performance problem in Android? Any practical solutions you can suggest?

1 Like