Download

RequestAsyncLoad blocks GameThread :-(

I’m trying to asynchronously load several datatables worth of content (skeletal meshes, static meshes etc) - I store configuration for my in-game NPCs there.

My async loading uses a set of soft obj ptrs (pic 1) stored in my GameInstance and loaded on UGameInstance::Init() with a delegate handled to it (pic 2). assetLoader is just a FStreamableManager object stored in the same GameInstance object as a property.
You can see on (pic 3) the huge freeze when the game starts (PIE).

The amount of assets in those DataTables matches this loadtime; however I expected the StreamableManager to load them async in some other thread or at least not chugging it all in one frame, while the GameThread would remain responsive and not freeze.

What am I doing wrong, guys?

UPD: One thing that comes to my mind is that it loads the datatable itself async but the datatable has refs to a lot of other assets, materials, animBPs, meshes etc, which are then loaded sync and that’s what blocks the gameThread. In other words, the async loading is not recursive. That would be unfortunate, but makes sense. I’ll try to dig around in the engine code.

UP2: OK, figured it out. Editor and some .LoadSynchonous() calls were actually calling FlushAsynchonousLoading(), which blocks GT until all loading finishes. I removed my LoadSync calls and moved the async loading request down the line, and now async loading works as intended.