Mad performance difference between HTML and cordova export.

Discussion and feedback on Construct 2

Post » Thu Jul 13, 2017 11:59 am

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:
Pros:
Way better performance, consistent 60 FPS
Doesn't have to tap for music playback

Cons:
Device buttons closes the game, not 100 % fullscreen
I get debug warnings on startup

Cordova export:
Pros:
Full screen
Ignores device buttons
Feels like an actual app

Cons:
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.
Thanks
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Mon Jul 17, 2017 12:13 pm

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?
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Mon Jul 17, 2017 7:11 pm

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:

HTML: tinimations.net/KlangM

APK Cordova - https://drive.google.com/file/d/0B1n4Fd ... sp=sharing
APK HTML - https://drive.google.com/file/d/0B1n4Fd ... 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.
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Mon Jul 17, 2017 11:13 pm

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.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Mon Jul 17, 2017 11:46 pm

@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?
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Tue Jul 18, 2017 9:23 am

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.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Tue Jul 18, 2017 9:34 pm

@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?
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Wed Jul 19, 2017 10:16 am

Hmm, so it sounds like it's Cordova then. It also sounds similar to this report from C3: https://github.com/Scirra/Construct-3-bugs/issues/467
Think we need to file an issue with Cordova about this...
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Wed Jul 19, 2017 11:53 am

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.
B
16
S
6
Posts: 29
Reputation: 1,196


Return to Construct 2 General

Who is online

Users browsing this forum: Google [Bot] and 7 guests