Getting weird performance profiling results (help)

So I am attempting to performance profile my “Portal” UE4 project (rendering portals using render targets and scene capture component) and I am getting really weird results when I disable the portals.

I am checking the frametimes of each thread CPU/GPU thread by using the console command “stat unit”.

Here are the results with portals enabled:

  • Game: 0.81ms
  • Draw: 0.69ms
  • GPU: 6.45ms
  • Frame: 6.45ms

And here are the results with portals disabled:

  • Game: 0.76ms
  • Draw: 2.53ms
  • GPU: 2.53ms
  • Frame: 2.53ms

The GPU frametime gets faster when I disable the portal (as expected), but the “Draw thread” (CPU render thread) goes up. What the heck? This makes no sense to me. Is this normal behavior?

Can someone explain this to me?

Are you sure the scene is in the same conditions for both cases?

It could be that your portal was hiding a bunch of stuff and so you were doing less calls from the draw thread.

Yup, same exact conditions and the portal planes are barely occluding anything behind them. It’s an almost empty scene.

Then you need more than just stat unit to understand what is going on! Try the most common rendering stats, there you should see where the time is actually spent.