Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

godot-performance-optimization

БесплатноЗапускает вложенные скриптыНе проверен

Expert blueprint for performance profiling and optimization (frame drops, memory leaks, draw calls) using Godot Profiler, object pooling, visibility culling…

thedivergentaiот thedivergentai★ 1 019 звёзд на GitHub

Об этом скилле

NEVER Do in Performance Optimization

  • NEVER optimize without profiling first — "I think physics is slow" without data? Premature optimization. ALWAYS use Debug → Profiler (F3) to identify actual bottleneck [20].
  • NEVER use print() in release builds — print() every frame = file I/O bottleneck + log spam. Use @warning_ignore or conditional if OS.is_debug_build(): [21].
  • NEVER ignore VisibleOnScreenNotifier2D for off-screen entities — Enemies processing logic off-screen = wasted CPU. Disable set_process(false) when screen_exited [22].
  • NEVER instantiate nodes in hot loops — for i in 1000: var bullet = Bullet.new() = 1000 allocations. Use object pools, reuse instances [23].
  • NEVER use get_node() in _process() — Calling get_node("Player") 60x/sec = tree traversal spam. Cache in @onready var player := $Player [24].
  • NEVER forget to batch draw calls — 1000 unique sprites = 1000 draw calls. Use TextureAtlas (sprite sheets) + MultiMesh for instanced rendering [25].
  • NEVER block the main thread for heavy operations — Avoid OS.delay_msec() or long synchronous data processing. Use WorkerThreadPool to keep framerates steady.
  • NEVER use complex collision shapes for physics queries — High-poly convex shapes are expensive to resolve. Prefer simplified primitives (Circle, Rectangle, Box).
  • NEVER forget to disconnect local lambda signals — Anonymous lambdas connected to global signals can cause memory leaks if the capturing object is freed.
  • NEVER use large textures without VRAM compression — VRAM is limited. Use S3TC/BPTC for desktop (DirectX/Vulkan) and ETC2 for mobile. Note: Disable compression for Pixel Art to avoid artifacts [13].
  • NEVER perform tree modifications during physics steps — Adding/removing nodes during _inter_ray or _physics_process can lock the physics server. Use call_deferred.
  • NEVER skip shader pre-warming in the Compatibility renderer — Unlike Forward+, OpenGL lacks Ubershaders. Pre-instantiate every mesh/VFX in front of the camera for 1 frame behind a loading screen to avoid hitches [21].

Debug → Profiler (F3)

Tabs:

  • Time: Function call times
  • Memory: RAM usage
  • Network: RPCs, bandwidth
  • Physics: Collision checks

Profiler-Tab Decision Tree

Open Debug → Profiler first. MANDATORY load only the script for the hot tab/symptom.

Do NOT Load every perf script for a single hitch.

Profiler / symptom Likely cause Script
Time — same script hot Alloc / get_node / process object_pool_system.gd, cache @onready; custom_monitor_profiler.gd
Time — off-screen AI/VFX Process while invisible MANDATORY manual_culling_logic.gd
Memory — climbs over time Leaks / unique resources shared_resource_strategy.gd; pair with debugging orphan tools
Physics — collision spikes Query/node RayCast spam MANDATORY low_level_physics_query.gd
GPU / draw calls Unique sprites/meshes MANDATORY multimesh_optimizer.gd / multimesh_foliage_manager.gd / texture_array_batching.gd
SceneTree overhead at scale Canvas/mesh item spam MANDATORY rendering_server_direct.gd
Main-thread hitch (gen/parse) Sync heavy work MANDATORY worker_thread_pool_manager.gd
Crowd path spikes Nav agents same frame navigation_agent_optimization.gd
Custom game metrics Missing monitors custom_performance_monitor.gd

Available Scripts

object_pool_system.gd

MANDATORY for hot-path spawn/despawn — reuse, do not invent Array pop pools inline.

manual_culling_logic.gd

VisibilityNotifier-driven process disable for CPU-heavy off-screen entities.

rendering_server_direct.gd

RenderingServer canvas/mesh path when SceneTree overhead dominates.

low_level_physics_query.gd

Direct space-state queries vs hundreds of RayCast nodes.

worker_thread_pool_manager.gd

WorkerThreadPool offload for heavy jobs.

multimesh_optimizer.gd / multimesh_foliage_manager.gd

Hardware instancing for dense meshes/foliage.

texture_array_batching.gd

Texture2DArray batching to cut material switches.

[shared_resourc

Полный SKILL.md на GitHub

Установить godot-performance-optimization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/migration-notes.mdreferences/profiler-budgets-and-prewarm.mdscripts/custom_monitor_profiler.gdscripts/custom_performance_monitor.gdscripts/low_level_physics_query.gdscripts/manual_culling_logic.gdscripts/multimesh_foliage_manager.gdscripts/multimesh_optimizer.gdscripts/navigation_agent_optimization.gdscripts/object_pool_system.gdscripts/rendering_server_direct.gdscripts/shared_resource_strategy.gdscripts/texture_array_batching.gdscripts/worker_thread_pool_manager.gd

FAQ

Что делает скилл godot-performance-optimization?

Expert blueprint for performance profiling and optimization (frame drops, memory leaks, draw calls) using Godot Profiler, object pooling, visibility culling, and bottleneck identification. Use when diagnosing lag, optimizing for target FPS, or reducing memory usage. Keywords profiling, Godot Profiler, bottleneck, object pooling, VisibleOnScreenNotifier, draw calls, MultiMesh.

Как установить скилл godot-performance-optimization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл godot-performance-optimization запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить godot-performance-optimization с