Profiling
Measure before you optimize
Also known as: Unreal Insights · Unity Profiler · Frame Debugger · GPU profiler · RenderDoc profiling · Performance profiling
Definition
Profiling is measuring where a game spends its time and memory, so you optimize what actually costs the most instead of guessing. Profilers show how long each system, function and draw call takes in every frame. Common tools are Unreal Insights and the stat commands in Unreal Engine, the Profiler, Memory Profiler and Frame Debugger in Unity, and external GPU tools such as RenderDoc, PIX and NVIDIA Nsight.
In production
Profile on the target hardware, in a build as close to the final game as you can, and not only in the editor, which adds its own cost. Change one thing at a time and measure again. Look for the largest items first, such as one expensive material or particle effect, because small fixes to cheap things change little. Save a baseline capture so you can compare after changes.