Game-thread performance
The game thread is the main bottleneck for many Unreal projects: it owns actor ticking,
Blueprint execution, input, physics callbacks, and UI updates. If the game thread misses
its per-frame budget, the frame is delayed even when the GPU is idle.
When to use this skill
- Frame rate feels low but the GPU looks underused.
stat unit or stat game shows the Game thread dominating the frame.
- Tick-heavy actors, Blueprint hot paths, or frequent
Tick() work are causing hitches.
- You need a quick mental model for how game-thread time translates into FPS.
Mental model: frame budget is fixed
The hard ceiling for one frame is 1000 / TargetFPS milliseconds, so every
extra millisecond of game-thread work costs real frame time:
| Target FPS |
Budget per frame |
| 30 FPS |
33.33 ms |
| 60 FPS |
16.66 ms |
| 120 FPS |
8.33 ms |
| 240 FPS |
4.16 ms |
| 360 FPS |
2.77 ms |
A useful rule of thumb:
- If the Game thread uses most of the frame budget, the game is CPU-bound.
- If the GPU or Render Thread dominates, the issue is rendering or fill-rate related.
What eats the game-thread budget
Common heavy paths on the game thread:
- Actor and component
Tick()
- Blueprint logic on every frame
- Excessive
GetWorld(), GetOwner(), Cast<>, or FindComponentByClass() in hot paths
- Repeated allocations, string building, and UObject churn
- Physics / collision / navigation updates that are too frequent
- Widget updates and Slate invalidation
- Large numbers of timers or delegate broadcasts every frame
The result is not just lower FPS. It is also more variance in frame timing, which feels like
stutter, input lag, or hitchy gameplay even when the average FPS looks acceptable.
Quick triage workflow
- Run
stat unit first.
- Game > Render / GPU? The game thread is the limiter.
- Render / GPU > Game? The problem is likely draw calls, overdraw, or post-process.
- Run
stat game to see which systems own the most game-thread time.
- If the hotspot is in your code, instrument it with
DECLARE_CYCLE_STAT,
SCOPE_CYCLE_COUNTER, or TRACE_CPUPROFILER_EVENT_SCOPE.
- Re-test after each fix; optimize the real hotspot, not the obvious one.
Optimization levers
1. Reduce per-frame work
- Disable ticking when the actor does not need it:
PrimaryActorTick.bCanEverTick = false
- only enable ticking when the object is actually active
- Use timers or events instead of
Tick() for infrequent logic.
- Cache references once instead of recomputing them every frame.
- Avoid expensive string formatting, allocations, or
NewObject churn in Tick.
2. Move expensive work off the game thread
- Put heavy CPU work on worker threads with
AsyncTask, TaskGraph, or a background job.
- Keep the final UObject / actor mutation on the game thread only.
- Use queues or atomics to pass data from worker threads back to the game thread.
3. Optimize hot Blueprint and C++ paths
- Move per-frame hot paths from Blueprint to C++.
- Replace lots of tiny operations with fewer batched operations.
- Avoid repeated
GetPawn(), GetComponentByClass(), Cast<>, or FindField<> calls in Tick().
4. Reduce physics, AI, and widget overhead
- Limit the number of actors doing expensive movement, collision, or simulation updates.
- Batch UI updates instead of invalidating widgets every frame.
- Reduce duplicate AI / EQS / navmesh work during gameplay.
5. Tune expectations for high-FPS targets
At 120 FPS, the full frame budget is only 8.33 ms. At 240 FPS, it is 4.16 ms.
If your game thread consumes 5 ms of that at 120 FPS, you are already spending most of the
budget before rendering starts. This is why high-refresh targets are unforgiving.
Example: safe game-thread reduction
void AMyActor::Tick(float DeltaSeconds)
{
QUICK_SCOPE_CYCLE_COUNTER(STAT_MyActor_Tick);
// Cache references once in BeginPlay / constructor when possible.
// Avoid expensive work here if it can run less often.
if (!bReady) return;
// Do only the minimal per-frame logic that must stay on the game thread.
}
If the work is heavy, move it to a worker task and apply the result back on the game thread:
AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [WeakThis = TWeakObjectPtr<AMyActor>(this)]()
{
// Heavy CPU work here.
// Do NOT touch UObject / Actor state from this thread.
});
Gotchas
- Do not assume GPU is the bottleneck just because the frame rate is low.
Check
stat unit and stat game first.
- High FPS targets are not free — 240 FPS and 360 FPS leave very little time for the
game thread, so hot-path cleanup matters more, not less.
- Moving the wrong things off-thread can create bugs. Only move work that is genuinely
CPU-bound and thread-safe; marshal actor/UObject mutations back to the game thread.
- Blueprint-heavy Tick is often the easiest win in a gameplay project.
References & source material
Engine source (UE 5.8):
Engine/Source/Runtime/Core/Public/Stats/Stats.h — stats and cycle counter helpers.
Engine/Source/Runtime/Engine/Private/LevelTick.cpp — per-frame tick flow in the engine.
Engine/Source/Runtime/Engine/Private/TimerManager.cpp — timer-based deferral paths.
Official docs (UE 5.8):
Related skills: ue-profiling-and-optimization, ue-timers-and-async, ue-debugging-techniques.
1---2name: ue-game-thread-performance3description: Explain how game-thread time drives frame rate and how to optimize it. Use when profiling CPU-bound frame-time spikes, tick-heavy actors, hitches, or when deciding whether to move work off the game thread.4---56# Game-thread performance78The game thread is the main bottleneck for many Unreal projects: it owns actor ticking,9Blueprint execution, input, physics callbacks, and UI updates. If the game thread misses10its per-frame budget, the frame is delayed even when the GPU is idle.1112## When to use this skill1314- Frame rate feels low but the GPU looks underused.15- `stat unit` or `stat game` shows the Game thread dominating the frame.16- Tick-heavy actors, Blueprint hot paths, or frequent `Tick()` work are causing hitches.17- You need a quick mental model for how game-thread time translates into FPS.1819## Mental model: frame budget is fixed2021The hard ceiling for one frame is `1000 / TargetFPS` milliseconds, so every22extra millisecond of game-thread work costs real frame time:2324| Target FPS | Budget per frame |25|---|---:|26| 30 FPS | 33.33 ms |27| 60 FPS | 16.66 ms |28| 120 FPS | 8.33 ms |29| 240 FPS | 4.16 ms |30| 360 FPS | 2.77 ms |3132A useful rule of thumb:33- If the Game thread uses most of the frame budget, the game is CPU-bound.34- If the GPU or Render Thread dominates, the issue is rendering or fill-rate related.3536## What eats the game-thread budget3738Common heavy paths on the game thread:39- Actor and component `Tick()`40- Blueprint logic on every frame41- Excessive `GetWorld()`, `GetOwner()`, `Cast<>`, or `FindComponentByClass()` in hot paths42- Repeated allocations, string building, and UObject churn43- Physics / collision / navigation updates that are too frequent44- Widget updates and Slate invalidation45- Large numbers of timers or delegate broadcasts every frame4647The result is not just lower FPS. It is also more variance in frame timing, which feels like48stutter, input lag, or hitchy gameplay even when the average FPS looks acceptable.4950## Quick triage workflow51521. Run `stat unit` first.53 - Game > Render / GPU? The game thread is the limiter.54 - Render / GPU > Game? The problem is likely draw calls, overdraw, or post-process.552. Run `stat game` to see which systems own the most game-thread time.563. If the hotspot is in your code, instrument it with `DECLARE_CYCLE_STAT`,57 `SCOPE_CYCLE_COUNTER`, or `TRACE_CPUPROFILER_EVENT_SCOPE`.584. Re-test after each fix; optimize the real hotspot, not the obvious one.5960## Optimization levers6162### 1. Reduce per-frame work6364- Disable ticking when the actor does not need it:65 - `PrimaryActorTick.bCanEverTick = false`66 - only enable ticking when the object is actually active67- Use timers or events instead of `Tick()` for infrequent logic.68- Cache references once instead of recomputing them every frame.69- Avoid expensive string formatting, allocations, or `NewObject` churn in Tick.7071### 2. Move expensive work off the game thread7273- Put heavy CPU work on worker threads with `AsyncTask`, `TaskGraph`, or a background job.74- Keep the final UObject / actor mutation on the game thread only.75- Use queues or atomics to pass data from worker threads back to the game thread.7677### 3. Optimize hot Blueprint and C++ paths7879- Move per-frame hot paths from Blueprint to C++.80- Replace lots of tiny operations with fewer batched operations.81- Avoid repeated `GetPawn()`, `GetComponentByClass()`, `Cast<>`, or `FindField<>` calls in `Tick()`.8283### 4. Reduce physics, AI, and widget overhead8485- Limit the number of actors doing expensive movement, collision, or simulation updates.86- Batch UI updates instead of invalidating widgets every frame.87- Reduce duplicate AI / EQS / navmesh work during gameplay.8889### 5. Tune expectations for high-FPS targets9091At 120 FPS, the full frame budget is only 8.33 ms. At 240 FPS, it is 4.16 ms.92If your game thread consumes 5 ms of that at 120 FPS, you are already spending most of the93budget before rendering starts. This is why high-refresh targets are unforgiving.9495## Example: safe game-thread reduction9697```cpp98void AMyActor::Tick(float DeltaSeconds)99{100 QUICK_SCOPE_CYCLE_COUNTER(STAT_MyActor_Tick);101102 // Cache references once in BeginPlay / constructor when possible.103 // Avoid expensive work here if it can run less often.104 if (!bReady) return;105106 // Do only the minimal per-frame logic that must stay on the game thread.107}108```109110If the work is heavy, move it to a worker task and apply the result back on the game thread:111112```cpp113AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask, [WeakThis = TWeakObjectPtr<AMyActor>(this)]()114{115 // Heavy CPU work here.116 // Do NOT touch UObject / Actor state from this thread.117});118```119120## Gotchas121122- **Do not assume GPU is the bottleneck** just because the frame rate is low.123 Check `stat unit` and `stat game` first.124- **High FPS targets are not free** — 240 FPS and 360 FPS leave very little time for the125 game thread, so hot-path cleanup matters more, not less.126- **Moving the wrong things off-thread** can create bugs. Only move work that is genuinely127 CPU-bound and thread-safe; marshal actor/UObject mutations back to the game thread.128- **Blueprint-heavy Tick** is often the easiest win in a gameplay project.129130## References & source material131132Engine source (UE 5.8):133- `Engine/Source/Runtime/Core/Public/Stats/Stats.h` — stats and cycle counter helpers.134- `Engine/Source/Runtime/Engine/Private/LevelTick.cpp` — per-frame tick flow in the engine.135- `Engine/Source/Runtime/Engine/Private/TimerManager.cpp` — timer-based deferral paths.136137Official docs (UE 5.8):138- Unreal Insights — https://dev.epicgames.com/documentation/unreal-engine/unreal-insights-in-unreal-engine139- Trace — https://dev.epicgames.com/documentation/unreal-engine/trace-in-unreal-engine-5140- Stat Commands — https://dev.epicgames.com/documentation/unreal-engine/stat-commands-in-unreal-engine141- Testing and Optimizing — https://dev.epicgames.com/documentation/unreal-engine/testing-and-optimizing-your-content142143Related skills: `ue-profiling-and-optimization`, `ue-timers-and-async`, `ue-debugging-techniques`.