Nifty Load Time - Android

I’m experiencing very long load times for my nifty gui on Android devices. The program loads almost instantly on Windows, but takes quite some time on Android. The main culprit I found is nifty.fromXml(“my xml file”), which is currently taking around 12 seconds to complete. Is this a known performance issue with Android, or am I missing something that could greatly speed this up? I’m testing on Android 4.2.2 (API 17) on a Nexus 10.

My xml file has:
-1 screen
-7 layers
-19 images
-59 controls (including list boxes, labels, tabs, dropbox, and buttons)
-63 panels

Are any of those outlandish numbers?

Any help would be appreciated, and thanks in advance.

Unfortunately there is no way around this. My guess is that more than the xml files, what takes some time is the loading of the 19 images.
Your file is big, and will have performance issues anyway. Nifty controls are slow on android.

For the loading problem you can use the splash screen so that the user doesn’t have a black screen when he launch the game.

2 Likes

Fair enough, and thanks for the quick response!

@nehon said: Unfortunately there is no way around this. My guess is that more than the xml files, what takes some time is the loading of the 19 images. Your file is big, and will have performance issues anyway. Nifty controls are slow on android.

For the loading problem you can use the splash screen so that the user doesn’t have a black screen when he launch the game.

Just a quetion: Should the splash screen to be Nifty or GuiNode?

Neither, it’s an android view.
The thing is it’s here to make the user wait while JME is initializing, so It can’t be a JME display.