Very bad performance on Android vs iOS?

Hey!

I just released an iOS game, and while trying to export the Android counterpart, I noticed that it is sooooooo much slower. By FAR. Like the first time to even open the game, it takes around 20 seconds between the splash screen and the menu screen. And it just gets worse when going into different parts of the game.

Using the profiler (full disclosure, first time I ever opened it) I saw this that I’m attaching, which explains a bit why it’s being so slow… the question is, how can I avoid that from happening? (and why doesn’t it happen on iOS)

Thanks!

You have a big texture in your resources folder?

I have almost all my assets in the resources folder. It looks like that is bad practice, which I never knew as I always worked with iOS and everything works just fine there.

So I’m now starting to look into Addressables, but also running into problems there: Getting InvalidKeyException but Key shows on Addressables.ResourceLocators

So i’m not sure if that is the path to go either…

I was able to solve that other issue and removed the usage of Resources.
Now my loading time went up :eyes:

Is there a better way to handle asset loading?

What devices are you comparing?

An iPhone 7 (where everything works great and menu screen shows up in less than 1 second) vs a Samsung Galaxy S10, where it takes at least 15 seconds to show the menu screen.

Asset bundles are usually the preferred way if you have to dynamically load content. But it is currently slower than it should be

Are you building with IL2CPP for Android? It should drastically reduce your load times, but even then, iOS is usually faster.

It says here: Assets, Resources and AssetBundles - Unity Learn that Asset Bundles are deprecated in favor of Addressables, so I’m using Addressables now

Yes, I’m using IL2CPP

Ok, I’m pretty sure this right here is to blame. I ran the Memory Profile, and here is the result:

That is A LOT to be loading in the menu screen. Now the question I have, is WHY is it loading all that, when for example all those “loading_” files are not even used on that screen?

Also, does anyone know if “GizmoIconAtlas_pix32” is something internal from Unity? It is not mine, and it doesn’t show up when I perform a search of my assets.

I also noticed that Fonts are HUGE. Are there any recommendation on how, or if it is even possible to bring those down?

For fonts, best option is to remove unused characters from the font/atlas. Specially if your game is English only. Other option is only load font for selected language.

The game is not english only, so I don’t think I can remove characters…

If I made an atlas with TextMeshPro, do I still need to keep the original font file?

If you have all the needed characters in that TextMeshPro atlas file then you do not need the font file.

Do you have any idea about “GizmoIconAtlas_pix32”? It’s taking 21.3 mb memory usage on my profile

I only saw that when profiling on the Editor. Not on an actual device

1 Like

i found same thing, did you solve it??