Before Investigating Performance Issues
Set a target frame rate for your game and continuously profile and benchmark against this frame rate. If you have a target frame rate, you can just use some math to determine your ideal frame time. If you want to assess the performance it’s usually best to uncap the frame rate. You can ensure you’re frame rate isn’t hitting a reasonable cap with the console command
1
t.maxfps 800
You’ll also want to make use of the follow command
1
stat unit
This will provide you with a great source of information about both the performance of the CPU and the GPU on a per frame basis. Using this you can first identify the bottle neck. Among Frame, Game, Draw, and CPU time which is the highest? Which is the lowest?
1
stat slow
Is useful if your CPU time turns out to be the bottleneck. You can use this to determine which actors are eating up your game frame time.
Optimization View Modes
Ensure you’re making use of the Shader Complexity optimization view mode to find any materials that are much more expensive than their surrounding neighbors. Keep in mind that each node you add to the material editor will result in a number of instructions being added to the final shader.
Draw Calls
Each object that you want to render will result in a batch of draw calls being sent to the GPU. It will build them up, mesh by mesh and group them up in batches to be rendered all at once by the GPU.
1
stat rhi
Useful for determining draw calls and texture memory usage as well as triangle usage in the scene.
Dynamic Shadows
It’s not the number of lights that are expensive in the level, it’s the number of shadows
You can optimize per light if that specific light should cast shadows. You also have the distance at which a light will fade out and stop affecting the world. Lights and shadows get more expensive as the poly count of the scene increases.