Android 4 vs Android 5+ FPS performance

Anything libgdx related goes here!

Android 4 vs Android 5+ FPS performance

Postby bartkinbote » Tue Dec 03, 2019 9:05 am

We use LibGDX to render the GUI of our app.
On older tablets running Android 4 it runs fine.
When upgrading these tablets to Android 5 or higher, the fps drops to a low rate, which leads to a bad user experience (so we downgraded the tablets again).
We've also tested on 30 different newer tablets running Android 5 through 8 with better hardware that the old Android 4 tablet. All have the same issue with lagging fps, that doesn't exist on the Android 4 tablet.
We are using the latest version of LibGDX.

Does this sound familiar? Is there some setting we should know of?
bartkinbote
 
Posts: 4
Joined: Mon Dec 02, 2019 3:49 pm

Re: Android 4 vs Android 5+ FPS performance

Postby shatterblast » Tue Dec 03, 2019 9:30 am

Have you upgraded to LibGDX 1.9.10? On that note, this version does not officially support Android 4.
shatterblast
 
Posts: 501
Joined: Sun Jul 06, 2014 1:14 pm

Re: Android 4 vs Android 5+ FPS performance

Postby bartkinbote » Tue Dec 03, 2019 12:01 pm

Yes, we use 1.9.10
bartkinbote
 
Posts: 4
Joined: Mon Dec 02, 2019 3:49 pm

Re: Android 4 vs Android 5+ FPS performance

Postby shatterblast » Tue Dec 03, 2019 4:58 pm

I'm not sure how you release your software, but Google intends on forsaking total support for Android 4. At the moment, it's possible to still download 32-bit binaries for Android 4 in some capacity off of Google Play in some way. However, Google already announced it would stop this. It progresses towards 64-bit apps only. They already no longer allow pure 32-bit apps as of several months ago, maybe half a year. It mainly relates to the CPU.

To my understanding, some Android 4 mobile devices no longer can use Google Play while others can, depending on their CPUs. Those that can provide support for dual-threading or similar with their Cores, even at 32-bit. Google instituted these changed in Android a few months ago, which may explain your slow down.

One option includes stepping down your support to LibGDX 1.9.9. This may allow you to transition more cleanly as Google does its stuff. Because the LibGDX binaries from this version pull from older Android code, it may avoid the slow down you experience from the code that tries to force 64-bit compatibility. At the same time, it would keep the ability to work with up to Android 8. I'm not sure in regards to 9.

I'm sorry to say, but you may need to brace for the inevitable. I don't believe this means you need to forsake your hard work and customers, though. You may want to release a different version on a different app platform and notify your customers of this, so that they can acquire it for both testing purposes and when the time comes. However, I don't have much knowledge in that. On the good side, LibGDX doesn't rush forward when it comes to providing new features. This will come to your advantage, since you will be able to use your same code base for a while, maybe a year at least, if you maintain a different version with your same code base.

The below link gives some ideas on maybe where you could store an older version for compatibility. I suggest speaking with a representative from a market place before investing in its structure.

1) https://medium.com/pen-bold-kiln-press/ ... c759de1c26
shatterblast
 
Posts: 501
Joined: Sun Jul 06, 2014 1:14 pm

Re: Android 4 vs Android 5+ FPS performance

Postby shatterblast » Tue Dec 03, 2019 5:08 pm

I notice that you mention it doesn't affect Android 4. AndroidX implements new features of hardware that may cause slow down with previously supported stuff. I still recommend down-grading to 1.9.9 for testing purposes. If you can, I suggest trying to keep only Android v4 Support stuff. This has the best compatibility with LibGDX and will range up to the coming Android 10. Anything above that is very Android version specific and known to cause slow-down, even with some things other than LibGDX. For instance, v7 Support stuff causes issues in certain devices.

For what it's worth, v4 Support files cover almost everything, except maybe Fitness gaming stuff, GPS location items, and Bluetooth. While I think there are ways around that, I'm not sure explicitly how.

You may have to define in your Android app what Support files not to include, since I think you mention that you just use LibGDX as an Overlay. I believe that, by default, a normal non-LibGDX app attempts to include most Support libraries if not all. The Android Manifest file would be a good starting place. This would perhaps apply to you if your project include files not normal to LibGDX yet standard to Android Studio for instance. Google possibly uses the concept for testing new hardware that releases freshly on the market.
shatterblast
 
Posts: 501
Joined: Sun Jul 06, 2014 1:14 pm

Re: Android 4 vs Android 5+ FPS performance

Postby bartkinbote » Wed Dec 04, 2019 1:52 pm

We've now tested with only using com.android.support:support-v4:28.0.0, and used gdx 1.9.9 instead of 1.9.10.
No noticeable improvement.

From Android 5 on, ART is used instead of Dalvik.
Can this be a cause of the lagging?
bartkinbote
 
Posts: 4
Joined: Mon Dec 02, 2019 3:49 pm

Re: Android 4 vs Android 5+ FPS performance

Postby shatterblast » Wed Dec 04, 2019 10:12 pm

Other developers possess much keener insight into Dalvik than myself, but I would guess a yes. It might be worth your time to pose a question in the LibGDX GitHub repo. I think this one surpasses what else I can come up with to suggest.

While I know it's possible to replace ART with Dalvik emulation, I would have no idea what to even recommend there. I believe certain versions of ART innately allow Dalvik emulation maybe. It's also possible to start that via JVM. RoboVM might have used the idea at one point. That's the limit of my knowledge.

1) https://github.com/libgdx/libgdx/issues
shatterblast
 
Posts: 501
Joined: Sun Jul 06, 2014 1:14 pm

Re: Android 4 vs Android 5+ FPS performance

Postby bartkinbote » Thu Dec 05, 2019 8:29 am

Thanks!
bartkinbote
 
Posts: 4
Joined: Mon Dec 02, 2019 3:49 pm


Return to Libgdx

Who is online

Users browsing this forum: No registered users and 1 guest