GPU/Frame Timing Discrepancy and Profiler Interpretation

Greetings Good Community,

I’m working on some optimizations and I need some help - information available online does not seem to adequately cover some aspects of this topic.

Open and Closed
Below is some basic thread times with descriptions about the conditions the metrics were taken.

It appears that I should be able to get results similar to item 1. Specifically, 0.16ms Draw call and around 20ms on the GPU/Frame threads. I have confirmed that these numbers are legitimate through actual performance of the game and so, for whatever reason, this level of performance should be achievable with no intervention on my part, as this is the level for the current state. But what is mind-blowing is that this is running in PIE, fullscreen view port and the Content Browser window open on monitor 2. If you look at item 2, you will see the output results, insanely different. Something to point out here: this variation in performance isn’t limited to having specifically the Content Browser open, it will also occur if you simply hover over a viewport button and a tooltip shows. The game runs performant accordingly.

If then, having some window open, such as the Content Browser, allows for this level of performance, even when not focused, that is, this seems to be a focus-independent phenomenon, this should be I think what I should see at all times.

Items 3 and 4 show the outputs for running in Stand Alone with the editor minimized, and shipping build performance with the editor shut down. Items 5,6, and 7 show the results for the item directly above, after implementing some optimizations, specifically regarding Draw Calls on static meshes. These results aren’t specific to the dynamic lighting, but all optimization attempts on the single directional dynamic light in the scene could not give any usable results. There can be no shadow whatsoever if there is to be any improvement at all with the dynamic lights.

The optimization of collapsing approximately 400 static meshes to 8 had the effects of 5,6, and 7, but while the draw call time with an open window or the shipping build very slightly improved, the GPU and Frame suffered, and especially when running in editor with no window open made the GPU and Frames 50% worse. Also strange to note: the Game thread improved substantially in PIE in all cases and negligibly in the shipping build.

Clearly the game can run with performance matching or at least coming close to item 1. I have attempted to ascertain what the differences could be, but unfortunately, I think it is well beyond any level of information available on the internet.

RenderDoc and Unreal Insights
I have attempted to use RenderDoc, but unfortunately, it cannot help, as mentioned above, when you hover over any editor UI element, the performance instantly goes to item 1, and there is nothing to capture. I have also tried to use RenderDoc externally from the editor and on the shipping builds, but this also does not seem to work. I cannot get any captures at all in this way, and unfortunately, after several hours of trying to figure that out, I have had to give up on that, I cannot at all seem to get a capture.

As this post is getting quite long, I won’t get into every single profiling technique I’ve used, but suffice it to say that I attempted every single one available on the internet in having worked on this issue for about a week now. The nearest one I could find to provide any actual usable information, Unreal Insights, also provides some very strange information, that at this point now, I have literally nothing else I can do, and will simply have to call this whatever on the topic.

Below is some output from profiling and as you can see, there is horrendous time used for ‘Frame’ and ‘FEngineLoop’. What fails is that there is no information other than that, and there is no information on what this is anywhere. To throw in another monkey into the wrench, is that DeferredShadingSceneRender_Render is taking 12.6ms, and I’m using Forward shading model and have been since day 1, since my characters have a need or they appear in an incorrect z-order. So the question here is two-fold, what is happening during the Frame and FEngineLoop, and why is it taking so long when there is no editor window open?

Plea for Help
Ultimately, I can live with the performance in the shipping build, but if it can be so much better, then I would prefer not to see performance issues as a complaint in my product. I am also asking this as with the FEngineLoop, I am not the only one with this question.

Is there anybody who can explain this and help me interpret this output data?

Thanks so much!

1 Like