Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Android App Bundle performance degradation vs APK

Discussion in 'Android' started by fiveampsoftware, Jun 22, 2019.

  1. fiveampsoftware

    fiveampsoftware

    Joined:
    Feb 9, 2015
    Posts:
    33
    Is anyone experiencing a significant degradation in game performance and framerates when building AAB's over the old APK method?

    With the upcoming 64-bit support, we opted to switch out build process to AAB's.
    https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html

    And on certain devices, Samsung S7 is one we have that experiences the issue, the game's performance tanked and framerates struggle.

    Cloud build thread on AAB building here:
    https://forum.unity.com/threads/creating-android-app-bundles-aab-with-unity-cloud-builds.600583/
     
  2. Aravind_Aby

    Aravind_Aby

    Joined:
    Jan 26, 2018
    Posts:
    6
    Hi, I am facing the same issue. Couldn't find a solution yet. Please do share the solution here if you were able to fix it.
     
  3. Tanek

    Tanek

    Joined:
    Apr 19, 2016
    Posts:
    45
    We are facing the same issue (edit: we are using Unity 2019.1.8f1) which is currently blocking our release in Production (we are testing the update in Beta): one phase of the game that was almost instantaneous now has a freeze of at least 2 seconds.
    Have you tried debugging with the profiler? Are you loading Asset Bundles?
    I am trying to narrow the issue and gather more data with the profiler, I think it is connected to file access, to be more specific in that phase we are reading Asset Bundles from the StreamingAssets directory and I think that switching to Android App Bundle (AAB) has changed something that makes this operation much slower.
     
    Last edited: Jul 9, 2019
  4. Tanek

    Tanek

    Joined:
    Apr 19, 2016
    Posts:
    45
    Sent a bug report for this.
    Here's the comparison on the same in-game phase, here are the profiler details when playing with an APK:
    APK_performance.PNG

    Here are the profiler details when playing with an AAB:
    AAB_performance_3.PNG

    It's almost 10 times slower for the same exact operation.
    This could be connected to Asset Bundle loading, as this phase loads some Asset Bundles for the procedural generation.
     
  5. Kmess

    Kmess

    Joined:
    Dec 21, 2013
    Posts:
    11
    So we had seen the same issues using 2017.4.27f1 - a lot of players had mentioned their runtime performance went to 15FPS (usually 60FPS for that specific device). We were able to repro on a S7 from Google Play Internal Test (not from the APK - the apk is fine). We resolved this by ditching AABs for 2017 and uploading a 32bit and 64bit APK. We have yet to profile this, we had to quickly resolve and submit using apks

    On our other title we used 2018.4.1f1 with an AAB - and so far no complaints or issues. We also haven't been able to repro this issue on our S7.

    Edit: We're not using any asset bundles
     
  6. Tanek

    Tanek

    Joined:
    Apr 19, 2016
    Posts:
    45
    Thanks for having shared your case, today we too will probably ditch AAB.
    So it seems it's not asset bundles related, I thought about them because my guts suggested it was something connected to file access or similar as there is a File.read that is 50 times slower when playing on AAB (the profiler details are in another screenshot I didn't post here).
    It could be something related to Textures (as of course after loading asset bundles we use them) and that "IntegrateAllThreadedObjects", which has a "Texture.WaitForAsyncUpload" that passed from 70ms to 1328ms.
     
  7. philspitlerSF

    philspitlerSF

    Joined:
    Oct 10, 2018
    Posts:
    37
    This sucks, I'm having the same issue but need to use AAB as my file is too large for APK and couldn't get Unity to split the APK into smaller pieces.....

    Any other advice on how to get round this?

    Cheers

    Phil
     
  8. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    If you are using asset bundles placed inside of the streaming assets folder, make sure you don't use capital letters (neither for asset bundle names nor the subfolders where you place them). This is a known issue for now.
     
    cdr9042 likes this.
  9. philspitlerSF

    philspitlerSF

    Joined:
    Oct 10, 2018
    Posts:
    37
    @JuliusM when you say it's a known issue, what is the issue?

    Does this cause performance issues?

    Thanks

    Phil
     
  10. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835