How to know which assets are being loaded by async IO tasks?

Giosialu
Fri, 13 Dec 2024 11:22:22 +0000
Debugging, Optimization, & Profiling

We’re having a weird issue with UNavigationSystemV1::OnWorldPostActorTick occasionally blocking the game thread until the current async pathfinding query completes… but it doesn’t even start for up to 50ms, since all of the Background Workers are filled with async I/O tasks.

I’ve tried using Asset Loading Insights, using channels
default,counter,stats,file,loadtime,assetloadtime,task,RHICommands,RenderCommands,Object,Metadata,Asset Metadata
and Named Events enabled on the running build; but still, the async load thread track seems to show only what’s being loaded from the game thread. Our async I/O tasks seem to be generated by the Render Thread, and mostly, but not only, by FDistanceFieldSceneData::AsyncUpdate calls that take much longer than others. I’ve even tried profiling directly from the Editor, hoping that those labels would be replaced with asset names, but they only got replaced with an “ExecuteTask” label.

Is there a way to inspect the loading cost of different assets? We have hundreds of assets and a quite short time for optimization. Working on assets optimization without knowing which assets are being more expensive would take months to fix this issue.

Also, it would be nice to understand what’s causing so many assets to start being loaded in a single frame: it doesn’t seem to be associated to level streaming nor to something spawning, so we don’t have a clue on why this is happening or how we could avoid this.

2 posts - 2 participants