Need help understanding and debugging very long cpu stall time!


The profiler for my game looks like below image. There are just too many CPU stall events and taking up hell lot of time!

I’m using scene capture to capture rgb image every frame. Hence, I’m calling FlushRenderingCommands() every frame. If you look at the second image, ReadSurfaceCommand is the one that will execute my functionality and it is taking ~23ms (this is bad too, if anyone knows how to improve this, please guide me), but cpu stall time is much huge!

Why is this happening? And what are the other event names, mainly these - FFileTransferRunnable, FMessageBus.DefaultBus.Router, TaskGraphThreadBP?