Logo di Ue Game Thread Performance

Ue Game Thread Performance

Community
kevinpbuckley
ue-game-thread-performance

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.

Panoramica

Pubblicato dakevinpbuckley
Repositoryunreal-engine-skills
Nome della skillue-game-thread-performance
Stelle
89
Fork
9
File inclusi
Solo istruzioni
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da kevinpbuckley su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Ue Game Thread Performance in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-game-thread-performance
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/unreal-engine-skills.git /tmp/unreal-engine-skills
mkdir -p .claude/skills
cp -r /tmp/unreal-engine-skills/skills/core/ue-game-thread-performance .claude/skills/ue-game-thread-performance
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Ue Game Thread Performance in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Ue Game Thread Performance non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Ue Game Thread Performance non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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 FPSBudget per frame
30 FPS33.33 ms
60 FPS16.66 ms
120 FPS8.33 ms
240 FPS4.16 ms
360 FPS2.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

  1. 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.
  2. Run stat game to see which systems own the most game-thread time.
  3. If the hotspot is in your code, instrument it with DECLARE_CYCLE_STAT, SCOPE_CYCLE_COUNTER, or TRACE_CPUPROFILER_EVENT_SCOPE.
  4. 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

cpp
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:

cpp
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.

Domande frequenti

Cosa fa la skill IA Ue Game Thread Performance?

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.

Perché usare Ue Game Thread Performance su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Ue Game Thread Performance è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Ue Game Thread Performance in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-game-thread-performance. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Ue Game Thread Performance?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Ue Game Thread Performance?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Ue Game Thread Performance: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Ue Game Thread Performance è gratuita?

È pubblicata su GitHub da kevinpbuckley. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇