Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Very bad performance on Android vs iOS?

Discussion in 'Android' started by bottledgalaxy, Oct 5, 2020.

  1. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    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!
     
    Last edited: Oct 5, 2020
  2. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
    You have a big texture in your resources folder?
     
  3. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
  4. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    I was able to solve that other issue and removed the usage of Resources.
    Now my loading time went up o_O

    Is there a better way to handle asset loading?
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,923
    What devices are you comparing?
     
  6. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    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.
     
  7. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
  8. mvaz_p

    mvaz_p

    Joined:
    Aug 22, 2018
    Posts:
    80
    Are you building with IL2CPP for Android? It should drastically reduce your load times, but even then, iOS is usually faster.
     
  9. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    It says here: https://learn.unity.com/tutorial/assets-resources-and-assetbundles that Asset Bundles are deprecated in favor of Addressables, so I'm using Addressables now
     
  10. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    Yes, I'm using IL2CPP
     
  11. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    Ok, I'm pretty sure this right here is to blame. I ran the Memory Profile, and here is the result:
    Screen Shot 2020-10-07 at 11.56.58 AM.png

    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?
     
  12. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
    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.
     
  13. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    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?
     
  14. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
    If you have all the needed characters in that TextMeshPro atlas file then you do not need the font file.
     
  15. yusufdemir2012

    yusufdemir2012

    Joined:
    Dec 21, 2013
    Posts:
    47
    Do you have any idea about "GizmoIconAtlas_pix32"? It's taking 21.3 mb memory usage on my profile
     
  16. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    82
    I only saw that when profiling on the Editor. Not on an actual device
     
    yusufdemir2012 likes this.
  17. wlchfl5358

    wlchfl5358

    Joined:
    Aug 18, 2020
    Posts:
    2
    i found same thing, did you solve it??