Search Unity

Addressables.LoadAssetsAsync() really slow?

Discussion in 'Addressables' started by johanwirde, Jan 24, 2020.

  1. johanwirde

    johanwirde

    Joined:
    Oct 27, 2015
    Posts:
    7
    Hi!

    In our project we load a large number of ScriptableObjects (~1500) using Addressables on game start with code that looks something like this:

    Code (CSharp):
    1. AsyncOperationHandle<IList<ScriptableObject>> op = Addressables.LoadAssetsAsync<ScriptableObject>("ScriptableObject", OnLoaded);
    2. yield return op;
    ("OnLoaded" basically does a bit of bookkeeping and updates a progressbar)

    All Scriptable Objects are in the same Addressables group with the label "ScriptableObject" and settings:
    • Pack Together
    • Comression LZ4
    The group is (on a PC build) about 240MB with some references out to other groups (I have so far not checked to what extent but would be great to get some advice on how to check).

    On PC this runs ok and loads all objects in maybe 10 seconds (from a mechanical disk, and with a cold start - if running a second time disk cache effects almost removes the load times completely), but on PS4 the same actions take almost a minute and a half to load all assets.

    When reading from SSD on Windows it is loaded almost instantly.

    I am guessing the problem is coming from bad reading patterns and disk seeks but is there any way I can:
    1. profile/verify this
    2. do something about it (like making sure the data is packed in a more read friendly way)

    Versions:

    Unity2019.2.17f1

    Addressables 1.5.1

    Regards,

    /Johan Wirde
     
    stonstad and piratmak like this.