Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow page transitions on Android with hardware acceleration on

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.

like image 675
Alon Gubkin Avatar asked Feb 04 '14 07:02

Alon Gubkin


2 Answers

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.

like image 149
Alon Gubkin Avatar answered Sep 27 '22 21:09

Alon Gubkin


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

like image 31
savgrace Avatar answered Sep 27 '22 21:09

savgrace