[ICODE]LoadAssetAsync()[/ICODE] seems to freeze game's main thread for 1-2 seconds

I am trying out some of the Addressables’ loading examples to instantiate gameobjects (mostly UI elements and particle effects) at run-time.

I am noticing that once my game is running after pressing play, the first call I make to LoadAssetAsync<T>(string someKey), or any other async load/instantiate method, freezes the game briefly for about 1-2 seconds. All calls thereafter with the same string key are instant. I am not subscribing to the Completion event or awaiting the result in any way - just the method call by itself causes this behaviour.

Is this normal? I’d like to also know if I’m misunderstanding the purpose of Addressable assets - I’m trying to use them a convenient, organized, and non thread-blocking way to instantiate prefabs on demand.

A simple example that causes this behaviour for me is:

public class MyScript : MonoBehaviour
    {
        void Update()
        {
            if (Keyboard.current.wKey.wasPressedThisFrame)
            {
                Addressables.LoadAssetAsync<Sprite>("someKey");
            }
        }
    }

Hi,
I think it should not cause the game to hang as well.
As a work-around, maybe you can try move the asynchronous loading of assets out of the update thread? Maybe you can start a Coroutine that loads the asset instead?

StartCoroutine(LoadMySprite());
}
...
private IEnumerator LoadMySprite ()
{
   // async loading
}

Everything here should be asynchronous. The only possible idea I have it when deserialising the json data of the catalog. However 1-2 seconds is very long.
Do you have a profiling capture that shows where the time is spent?