Render Query Result and slate ui dropping fps

There’s something in UE4 that makes RenderQueryResult take a lot of time in some situations. I’ve seen this happening a lot on less capable GPUs but recently I had a project that had the same issue on nVidia GTX 1060 in some specific cases.

I first identified the bottleneck in that project as InitView/…/OcclusionCulling/…/RenderQueryResult so I’ve disabled Occlusion Culling for the project to see if that changes anything and to my surprise that had no effect on performance. The hot path in the render thread moved from OcclusionCulling to Slate/…/RenderQueryResult but the call was taking the same amount of time. Which is quite odd if you ask me!