Addressables.LoadAssetAsync incredibly slow even when all bundles are cached

Why am i spending more than 70 seconds loading 30 materials using Addressables.LoadAssetAsync from cached data downloaded using Addressables.DownloadDependenciesAsync on all keys in
Addressables.ResourceLocators.

Using Resources.Load to load the same materials takes milliseconds.

What i’ve tried:

  • Asset Bundle CRC: “Enabled”, “Disabled” and “Enabled, Excluding Cached”.
  • Bundle mode: Pack Separately / Pack Together with each material marked as addressable individually.
  • Different Asset Bundle Compressions
  • Contiguous Bundles: Enabled / Disabled

I’ve ran into so many strange issues with addressables. This should be a solid and polished product at this point?

Any tips to get comparable performance to Resources.Load from Addressables that are already cached?
Thanks

:smile::p:smile::stuck_out_tongue:

Hi vic! this has been an issue for months, there is a tentative fix in this thread: https://discussions.unity.com/t/932574

Thank you, but this is a different issue. I’m not having slow building of bundles. I have slow querying/loading of assets from the bundles at runtime.

SOLUTION:
My load times went from 70+ sec to 3 sec by enabling “Use UnityWebRequest for Local Asset Bundles”

I can’t wait for the day when unity can produce production ready software.
One day…

+1

Just wanted to say you’re not alone. For me Addressables also behave weirdly, loading 30 sprites async from local SSD takes 500 frames while Resources do that within like 1 frame. Perhaps there is some checkbox somewhere for this, we’ll see after probably many hours of investigation.

Unity is lucky that they’re still the best option out there for indies.
Otherwise there wouldn’t be much holding us back from immediately jumping ship to avoid the unbelievable amount of time wasted on poor implementation or QA.

@twell59

I’ve managed to get acceptable performance. If you’re still stuck feel free to dm me on discord and i’ll share settings etc.
Same username as on here.

Hi victornor! I have the same problems with addressables. it works really bad(
I cant add you on discord because your privicy settings.
Could you explain your solution here?

I don’t have the time to figure out what exactly made the biggest impact.
I might miss something, but this is some of the changes i’ve done.

  • Asset Bundle CRC: “Enabled, Excluding Cache” (will speed up cache loads)

  • Use UnityWebRequests for Local Asset Bundles: Enabled

  • Make a separate group for the assets i’m preloading at application launch.

  • Assign label to anything i need to preload or load outside of the automatically loaded content (assets in addressable scenes).

Then i preload my data using the LoadAssetsAsync with label like so:

object key = "preload-materials";
var materials = Addressables.LoadAssetsAsync<Material>(key, null, true);
yield return materials;

We’re still forced to use async loading, because Addressables doesn’t give us the option to load synchronously on the main thread…

Thanks for your answer!
But I solved this problem differently. I just moved Addressables to the trash!
Now I use old standart asset bundle system.
My bundles is three times less in size than it was with addresables.

I have done several tests.
Old asset bundles load 4 times faster from the cache.

Addressables is a trap

Hey everyone, I just wanted to post a link to a blog post we made for recommended settings given different platforms: Addressables: Planning and best practices

If changing “Use UnityWebRequest for Local Asset Bundles” speeds up your loads, I assume you’re on Android (maybe not). Anyway, that setting, and others, have a recommendation in that link. Hopefully that helps. I know the combination of Addressables settings can be overwhelming, so hopefully this blog post helps. These are definitely usability concerns that we are taking into consideration for the future.

I cannot really find a recommendation to use “Use UnityWebRequest for Local Asset Bundles” in the mentioned blog post. And if this is already well known that on Android this setting is necessary I don’t understand why we have to manually configure that. Also are there any plans to speed up the non UnityWebRequest version?

@davidla_unity Do you have performance metrics to show that the new addressables system is faster? Similar to @mops398 's comment above, I have found it to be significantly slower.

  • The LoadAssetAsync method appears to introduce frame rate stutters that affect rendering.
  • If CRC is enabled all hell breaks loose and load times are 10x slower – this should not be enabled by default.

What does your own internal data tell you about addressables performance versus the solution it replaced?

davidla_unity

The problem remains, I have sorted out all the settings as discussed on the forum and my assets are loading very slowly on my android device. The parameters are as follows:

  • remote download is very fast - 15 seconds with 150~ mb
  • Unpacking - 2-3 minutes the first time and subsequent times as well
  • CRC - disabled
  • UnityWebRequest - enabled/disabled - either way the result is the same
  • LZ4 compression
  • Bandle mode - together / separately - no difference
  • Non-recursive dependencies - not important
  • Addressable files version - 1.21.21
  • Unity version - 2022.3.1

But,

if I use local addressable assets - the result is better and I didn’t achieve the same effect. Looks like a very strange behavior and I would like to understand how I can solve this problem.