Search code examples
androidcordovaandroid-webviewandroid-4.2-jelly-bean

Drastically decreased performance of webview in Jelly Bean?


I am developing a game in Javascript/HTML/CSS and packaging it into an Android app with Phonegap. The game includes a bunch of animations (many done with jquery) such as fadeins/fadeouts, div movements, etc. - nothing out of the ordinary but certainly heavy relative to most websites out there.

In ICS, the game runs extremely well - very high fps, no lag, etc. However, now that I upgraded my Galaxy Nexus to 4.1, Jelly Bean has resulted in the game slowing down to a crawl. Fade ins are now more akin to show, I constantly notice slow responsiveness to touch, the projectiles being shot keep occasionally freezing, etc.

I realize this is quite general, but I am just curious if anyone else is seeing / has seen something similar in their applications and if you have suggestions for how to fix this mess. Any tips are much appreciated.

UPDATE: after enabling 3D transforms and rewriting part of the code to include everything in Animation Frame the issue seems to be fixed.


Solution

  • after enabling 3D transforms and rewriting part of the code to include everything in Animation Frame the issue seems to be fixed.