Mad performance difference between HTML and cordova export.

0 favourites
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • So in an attempt to experiment with optimal export solutions, I found that I can get an APK built with both an HTML and Cordova export. Thing is... There's pros and cons to both of them. This is the result I got after building with Adobe Build Phonegap. Not succeeded in getting anything else to work.

    HTML5 export:


    Way better performance, consistent 60 FPS

    Doesn't have to tap for music playback


    Device buttons closes the game, not 100 % fullscreen

    I get debug warnings on startup

    Cordova export:


    Full screen

    Ignores device buttons

    Feels like an actual app


    Bad performance, sub 30 fps, hiccups

    Phone heats up to the point of being able to use it as a torture device (and this is an S7!)

    Have to tap to make music play

    Any tips on getting the best of both worlds on an export? I really want to figure out these usability issues as fast as possible.


  • It sounds like Cordova is using software rendering for some reason. Are you comparing to the Chrome browser on the same device? What does chrome://gpu say?

  • Hi Ashley Yes it's on the same device. Everything except Native GpuMemoryBuffers and video Encode is hardware accelerated on my S7. Multiple Raster Threads are disabled.

    Chrome is like flawless 60 FPS. Almost feels smoother than my monitor. Turning off "Use new Intel XDK project format" fixed the heat problem, but the performance still isn't quite up to the level of chrome. At this point I'm not sure if it's just the true full screen on the app that does it, or wether cordova's slower. One thing I also notice between these 2 exports is that audio analyser effects aren't supported on the HTML one? The browser version also struggles with this on iOS devices. Any tips on this?

    You can test it for yourself if you're interested:


    APK Cordova - ... sp=sharing

    APK HTML - ... sp=sharing

    You'll notice especially on the level with several enemies that the framerate occationally dips down to the 45 range even on an S7 with the cordova version.

  • Can you try it in the HTML5test webview as well? That's just a raw Android web view so should isolate if the problem is caused by Cordova or the web view control.

  • Ashley Hmm not sure what you're looking for in it? It's chromium 59 with android 7. Score's 504.

    Any way for me to test the score of the Cordova app?

  • No, I mean run your game in that app. The test is irrelevant. It's just a convenient way to run a raw Android webview.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ashley Oh! Didn't notice before now I could go to other URLs. So I checked the game through the webview, and it's arguably the best performance yet. Butter silky, silky smooth. Does that mean it's isolated to cordova/phonegap build?

  • Hmm, so it sounds like it's Cordova then. It also sounds similar to this report from C3:

    Think we need to file an issue with Cordova about this...

  • Most likely all versions of Cordova have horrible performance on mid-range devices. I tested WebView with Intel XDK for a while and the performance was always bad.

    However, using Crosswalk improved performance. Now that Crosswalk is not as widely used it is likely people have started reporting performance issues.

  • I'm having the same exact issue, as well. The game runs smoothly in the Chrome app, and terribly using Phonegap Build with no special plugins. I tried Crosswalk, even though it's not maintained, and it worked a bit better but still poorly. I also tried disabling hardware acceleration to see if that made a difference, thinking that if it didn't maybe it wasn't enabled to begin with, and the game performed even worse.

    Has anyone tracked down the issue by any chance? I created a super simple app through PGB of a sprite moving across the screen, and the movement was still jerky. Again, in the mobile browser, smooth as silk.

  • Hi, i have a simple game, obstacles and background have bullet behavior and they are moving when game start. There is no problem when preview on pc but on mobile phone moving is not smoothly, they are hanging out. i read you essays about performance and i tried to improve performance but i couldnt get satisfying reslts(i used pin behavior for obstacles, compiled android 5.0 and above e.g) Could you give me a suggesstion.

    i think it is about cordova.

    Thank you very much for your help.

    here is my capx.!AqFO0HJuQq4Oh-pMwzAHeTLWfS1mYA

  • lokmanocek

    If you mean that the Dino is not moving smoothly the reason for that is, that you had the animation (Image Points Off) in some frames

    Now For Optimization Issues, I noticed that you don't use:



    instead of checking every thick if the Player is jumping you could just use the trigger (On Jump) to set to jump animation

    To reset the Level you have again is touching Reset Button when you could replace it with "On Touched Restart"


    You have 7 events just to check collisions against Obstacles were you can change it to one event with families

    The is outside of layout "same as above"

    Another Think you know even if you set an object invisible is still active? the Button "Restart" is on the Middle of the screen invisible but is still active whenever someone touches it even if is still invisible it will fire up the event Restart as you are continuously checking every thick if the player is touching this button.

    you should use something like Booleans to avoid this,

    example "IsActive" and turn it on only when Player loses

    I modified it your capx have a look

    Last think use sprite fonts instead of Txt that uses a lot of resource on the Phones

  • thank you very much for your suggestions. i will try them immediately

  • actually my problem is not dino. background and tree obstacles are not moving smoothly and they are hanging out. thank you

  • actually my problem is not dino. background and tree obstacles are not moving smoothly and they are hanging out. thank you

    You know what you are right, yesterday I never manage to test it on any phone I was just pointing things that can cause performance Drops, I was pretty sure that will be the restart button the problem,

    but today I tested on Iphone6 over Wifi and the Performance is terrible but is nothing to do with the (Fps or Cpu) those looks ok,

    The Moving objects like trees, obstacles, etc... are the ones causing the problem (They Move too jerky) they all have Bullet behaviour so it may be something to do with that?? I have no idea but it shouldn't do that, even after I removed all the events and extra things I just left the moving objects Nothing more to check just destroy outside Layout it didn't help is still doing the same

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)