Phonegap build ~125mb memory use at 60fps, for ~25mb 2fps?

Discussion and feedback on Construct 2

Post » Sun Sep 27, 2015 10:57 pm

I have to different projects that I have been trying different android builds of using various methods (crosswalk, cocoonjs & io, and phonegap).

For one game with C2 displaying an about 125 mb memory use, which I expected to run really slowly, I'm getting about 60fps on my test device. For another game with about 25mb, I am getting about 2 fps.

Can't figure out what the difference is. Tried so many settings changes, all project settings for the smaller (and slower) game I changed to mimic the faster, larger game, no box2d physics, everything I could think of.

Anyone know what behaviors or objects or settings tend to slow down phonegap builds?

I know alot of people have experienced unusable framerates from phonegap, so when I had this larger memory use game actually performing great I was really suprised. I really want to figure out what the difference is, especially given how easy a phonegap build is compared to something like ludei's cocoon.
B
5
S
2
Posts: 32
Reputation: 493

Post » Sun Sep 27, 2015 11:08 pm

Memory rather do not have any impact on game speed. If your mobile have not enough memory then game will probably crash or not run at all, but it won't make it work faster or slower.
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Post » Sun Sep 27, 2015 11:40 pm

I was under the impression it had alot to do with performance, but looking into it more it seems a wide range of other factors could be influencing performance.

Regardless, in the build of the smaller game, even my title screen layout, with 2 animated sprites, one event (checking for a touch to then load next layout), and one background image, seems to be running less than 5 fps.

I'm mainly wondering what might be part of the cause of it.
B
5
S
2
Posts: 32
Reputation: 493

Post » Sun Sep 27, 2015 11:42 pm

What kind of exporter are you using and what kind of devices you are testing on?
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Post » Sun Sep 27, 2015 11:55 pm

Cordova export, testing on a droid bionic running Android version 4.1.2
B
5
S
2
Posts: 32
Reputation: 493

Post » Mon Sep 28, 2015 6:19 am

If you use C2 for mobiles, its vital to start testing performance on mobiles from the start. Use the cpuutilisation to check on your target device, this way you know when you add some new features and it drops performance (cpu usage jumps up), you know that's to be avoided.

Some behavior or effects hurt performance a lot on mobiles. I posted awhile ago with a short list of things to avoid.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Mon Sep 28, 2015 1:26 pm

See Performance tips

On old Android devices the GPU may be blacklisted - check by opening Chrome and visiting chrome://gpu.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Wed Sep 30, 2015 7:03 pm

@Silverforce I have tested the whole time on this mobile device, using testing on a local network on both the mobile chrome browser and one other browser since I started the project, and have always had great performance. That is part of the reason I have just been wondering if anyone has more insight on what causes the slowdown in the actual build.

I was under the impression testing on the mobile browser would give an accurate idea of how the actual build would perform, but I guess I should have been making test builds throughout the development process.

@ashley Canvas is hardware accelerated, webgl is unavailable. I have enabled webgl effects in my project, but do not actually use any webgl effects in the project. I will try to find a webgl capable device to test performance on and see if there is a difference.

Thanks for the input so far.
B
5
S
2
Posts: 32
Reputation: 493

Post » Wed Sep 30, 2015 7:12 pm

@ashley is there a way to force webgl acceleration within the phonegap build? I read accessing the chrome://flags in the browser allows the change, but my problem occurs in the actual phonegap build, not in the browser local network test.
B
5
S
2
Posts: 32
Reputation: 493


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests