Unreal Performance — stat unit first, optimization after
Performance in Unreal is a methodology, not a bag of tricks. The right order is: measure → identify the bottleneck → optimize that specific thing → measure again. Any deviation is guessing. People who optimize "everything" without stat unit waste days on edits that don't move the FPS.
A frame in Unreal runs in parallel on three threads: the game thread (logic, Tick, AI, Blueprints), the render thread (Draw — culling, draw-call setup, command submission), and the GPU (rasterization, shading, post-processing). Frame time is the max of the three, not the sum. So speeding up the GPU on a game-bound frame buys you nothing: the bottleneck is elsewhere.
The most common mistake is "my FPS is low, buy a better GPU" or "let's optimize the materials". Without stat unit you can't know who's at fault. It might be one Actor with a heavy Tick; it might be 5000 unique draw calls; it might be two dynamic point lights with shadow maps. Each cause has a different cure. This topic teaches you to tell them apart and pick the right tool.
Topic map
- Profiling tools —
stat unit,stat gpu, Unreal Insights, GPU Profiler, command-line-trace=. - CPU vs GPU bound — identifying the bottleneck, what "Game/Draw/GPU dominates" means,
r.ScreenPercentageas a test. - Tick optimization —
bCanEverTick,SetActorTickEnabled,TickInterval,TickGroup, replacing Tick with delegates and timers. - Draw calls — what they are, why the
Drawthread issues them, batching, instancing, material instances. - LOD system — distance/screen-size LODs, HLOD, proxy meshes, World Partition and stream-out.
- Culling — frustum culling, occlusion, distance culling, cull distance volumes, dithered LOD transitions.
- Instancing —
ISM,HISM, vsStaticMeshComponent, when to use, limitations. - Lighting cost — static/stationary/movable, dynamic shadows, light count, shadow casting, virtual shadow maps.
- UI performance — UMG invalidation, Invalidation Box, Retainer Box, widget hierarchy, replacing
Tickwith delegates. - Object pooling — the pool pattern, why
Spawn/Destroyis expensive, projectile/VFX implementation. - Collision optimization —
TraceChannel, simple vs complex,NoCollision, filters, queries vs physics. - Memory profiling —
memreport,LLM, Memory Insights, GC cost andForceGarbageCollection.
Common traps
| Mistake | Consequence |
|---|---|
Optimizing without running stat unit | You fix the wrong bottleneck; FPS doesn't move |
Adding Game + Draw + GPU | They run in parallel; frame time is max, not sum |
Leaving bCanEverTick = true by default on every actor | Thousands of empty ticks eat the game thread |
Spawning a projectile via SpawnActor every shot | Heavy allocations, GC pressure; you need a pool |
| Using a dynamic point light when not needed | Each shadowed light is a separate shadow pass on the GPU |
Using StaticMeshComponent for 5000 rocks | Each is its own draw call; you need HISM |
Putting Event Tick in a UMG widget | UI redrawn every frame; use delegate-driven updates |
| Assuming LODs are automatic for any mesh | LODs must be authored for the specific asset |
Testing GPU bottleneck at 4K without r.ScreenPercentage | You can't separate resolution from shader cost |
LineTraceByChannel every frame on every enemy | Dozens of physics-scene queries; cache, filter |
Thinking Destroy() frees memory immediately | The object goes to GC; release is deferred to the next cycle |
| Profiling in editor and drawing conclusions about packaged builds | Editor includes tool/slate overhead; numbers are irrelevant |
Interview relevance
Performance is a senior-level topic. Interviewers check:
- Knowledge of
stat unitand interpreting the three threads (Game/Draw/GPU). - The canonical loop: profile → bottleneck → targeted fix → re-measure.
- Distinguishing CPU-bound from GPU-bound and proposing different fixes.
- Why
ISM/HISMreducesdraw calls, not "GPU work in general". - The cost of dynamic shadows vs static lights.
- The pool pattern and why
SpawnActoris expensive.
Common wrong answer: "I optimize materials, set up LODs, and the game runs fast." Real answer — without diagnostics you don't know what the bottleneck is. A scene with 200 dynamic lights and one material doesn't have a material problem; a scene with 50000 unique meshes without LODs doesn't have a lighting problem. stat unit first, the conversation second.