7

I'm trying to run the ionic-angular-cordova-seed project on Android 4.3.1 with Cordova. One thing I've noticed is that page transitions (for example, clicking on a tab or a list item) are very slow.

I tried to disable hardware acceleration using:

super.appView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);

... and it worked perfectly. But then scrolling, side menu sliding and more animations became extremely slow.

I've tried FastClick, it didn't make any difference.

I found this CSS-based solution to the problem, but I'm not familiar enough with Ionic to apply it on it. Any ideas?

Note: I'm not using any animations for page transitions.

Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288

2 Answers2

4

It seems like Ionic has made a lot of Android-related fixes that really improved performance. In addition, I've splitted my Android version into two versions: 4.4 and pre-4.4. Pre 4.4 is using cordova-android-chromeview which makes it so much faster. Even though it adds ~20 MB to the apk, it worths it.

Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288
  • According to this thread, chrome-view (on Android 4.4) is actually *slower* than the webview featured in prior Android versions. I can confirm that on my LG G3 (4.4) performance is very bad for this high-end device. The app runs *faster* on an older worse phone, pre 4.4. What's the solution? On 4.4, do I need to package anything special? How do we do this? And on pre-4.4? Thanks! https://groups.google.com/forum/#!topic/phonegap/1ZxXe6chHZc – mylord Nov 11 '14 at 10:10
  • Same issue http://forum.ionicframework.com/t/slow-page-transitions-on-android-with-hardware-acceleration-on/799/13 , maybe you'll find it useful – Olvathar Dec 12 '14 at 10:27
  • IOnic now comes with crosswalk – Sani Yusuf Mar 11 '15 at 16:06
  • @Sani It doesn't come with Crosswalk. It just plays well with it :) You still have to use cordova plugin add cordova-plugin-crosswalk-webview – Android Noob Jul 30 '15 at 20:35
  • @AndroidNoob At the time of this comment they had thier own implementation so yes. But At the moment now they advice you to use the plugin. – Sani Yusuf Jul 31 '15 at 09:55
1

Since this bug seems to be very specific to Android 4.4.2 I believe this may be what we're looking for, or at least helpful: http://playlablondon.tumblr.com/post/102534909709/improving-performance-on-cordova-powered-android

savgrace
  • 41
  • 3