Ue Game Thread Performanceのロゴ

Ue Game Thread Performance

コミュニティ
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.

概要

公開者kevinpbuckley
リポジトリunreal-engine-skills
スキル名ue-game-thread-performance
スター
89
フォーク
9
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    kevinpbuckleyがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Ue Game Thread Performance」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-game-thread-performance
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでUe Game Thread Performanceを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にUe Game Thread Performanceを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Ue Game Thread Performanceは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

よくある質問

AIスキル「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.

TypingMindでUe Game Thread Performanceを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Ue Game Thread Performanceはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにUe Game Thread Performanceをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-game-thread-performanceを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Ue Game Thread Performanceを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Ue Game Thread Performanceで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもUe Game Thread Performanceを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Ue Game Thread Performance」は無料ですか?

kevinpbuckleyがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇