Performance problem with samsung galaxy s5

Hi,
I’m developing an RTS game via cocos2d-x.
The performance of the game is good and never goes under 40 fps even on 2 core phones.
It worked well on samsung galaxy s5 too, until the device was updated to android 5. After the update, the performance of the game is terrible. FPS decreases as time passes.
Does anyone have similar issues or can guide me how to debug this issue?

Thanks

Which Cocos2d-x version are you using?
Just a wild guess, but could be related to: https://github.com/cocos2d/cocos2d-x/pull/12098
Are you playing sound effects?
Try disabling all sound effects and see if the performance issue still exists.
Not sure if the ‘lag’ in the linked issue is just a delay in playing effects, or if it makes the entire game ‘lag’…

I was using cocos2d-x 3.3, but updated to 3.6 sometimes ago and the problem didn’t solve.
I am playing sound effects, but disabling them does not solve the issue.

I found something that may cause the issue.
I have a LabelTTF which displays a timer. Updating the text in the label causes a small lag. And because it is a timer, it lags every second.
Do you have any idea why updating a label causes lag?

Thanks

You may find that LabelTTF is just too slow for that type of thing. We moved to BM fonts pretty quickly after dealing with performance issues in TTF.

To @Heyalda is there a list of known versions of Cocos2-dx that impacted by that bug?

Do you have problem with other games too in your device? If YES, continue reading :slight_smile:
I am asking this because i have galaxy s4 and i was having same issue for all games when i got android-5 update.
Initially i thought the same that its issue with cocos2d-x with lollipop update but after factory reset problem was gone for all games. Also be sure that you are using default font in your device(with other fonts its still having some memory issue)

@corytrese , unfortunately, I think it is any version of SimpleAudioEngine before 3.7, because I think they all use SoundPool.preload. https://github.com/cocos2d/cocos2d-x/issues/9911

I read something similar to what @smitpatel88 said. There are general performance problems with Lollipop pre 5.1.

I don’t want to update my existing devices yet for Android 5. But I just ordered an Nexus 9 with x64 with Lollipop to test on. When I get it I will post to this thread if I see any performance issues.

Do you know if Samsung posts their system images somewhere so that I can download and swap to different version as needed e.g. 5.0.1 and 4.4.4?

I have a Galaxy S5 that I will upgrade to Android 5 (currently running 4.4.4) once the adoption rate of Lolipop gets up to about 30% (currently at 10% of Android devices).

Not an apples-to-apples comparison for your Galaxy S5 upgrade to 5, but I just tested my games on a Nexus 9 x64 with Andorid 5.0 running.

My games are physics based side scrolling racing games. The performance was great with Cocos2d-x 3.7rc0. But one elephant in the room issue is that the Nexus 9 is quite a powerful device with the NVIDIA Tegra K1 CPU.

You can download any available rom for your samsung device from here:
http://www.sammobile.com/firmwares/search/galaxy%20s5/

I’m hoping to find a way to get official firmware images from Samsung that can be verified authentic somehow, like Google provides here: Factory Images for Nexus and Pixel Devices  |  Google Play services  |  Google for Developers

I saw that site, but looks kind of like a warez site and it is not affiliated with Samsung in any way.
Sammobile.com claims they are official firmware images that they downloaded using the Kies app, but they dont provide an MD5 or SHA1 so you don’t really know what you are getting. And even if they did provide a hash, they are a third party not associated with Samsung. Kind of risky to use their firmware images.