godot-performance
Skill54 starsChanged 14 days agoMITView on GitHub
Find and fix performance problems in Godot 4.7 - profilers and monitors, frame budgets, MultiMesh and server APIs for thousands of objects, WorkerThreadPool and thread groups, GDScript/C# hot paths, draw calls, lights, LOD, physics cost, loading and memory leaks. Use when the game stutters, FPS is low, loading is slow or memory grows.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- MindsMaster/godot-claude-code-skillstheir own version, first seen Oct 25, 2026
- MRCalderon3D/everything-game-dev-codetheir own version, first seen Oct 13, 2026
- vl4dt/godot-skillstheir own version, first seen Jun 21, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- MRCalderon3D/everything-game-dev-code★ 105same name
- vl4dt/godot-skills★ 8same name
- MindsMaster/godot-claude-code-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- godot-2dSkill
- godot-3d-gameplaySkill
- godot-3d-renderingSkill
- godot-addonsSkill
- godot-animationSkill
- godot-architectureSkill
- godot-audioSkill
- godot-coreSkill
- godot-csharpSkill
- godot-editor-toolingSkill
- godot-export-ciSkill
- godot-game-feelSkill
- godot-gdscriptSkill
- godot-inputSkill
- godot-migrationSkill
- godot-mobile-webSkill
- godot-modding-dlcSkill
- godot-narrativeSkill
- godot-navigation-aiSkill
- godot-networkingSkill
- godot-physicsSkill
- godot-proceduralSkill
- godot-shaders-vfxSkill
- godot-testing-debugSkill
- godot-uiSkill
- godot-xrSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Measure first: Never optimize blind. A budget of 16.6 ms per frame (60 FPS) or 8.3 ms (120 FPS) covers script, physics, rendering on the …
- Distinctive: line 26
Thousands of things: stop using one Node per thing.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance (4.7)
Measure first. Never optimize blind. A budget of 16.6 ms per frame (60 FPS) or 8.3 ms (120 FPS) covers script, physics, rendering on the CPU and GPU.
Tools
- Editor Debugger: Profiler (script functions; start it, play, then sort by self time), Visual Profiler (CPU vs GPU per render pass), Monitors (FPS, process/physics time, objects, nodes, orphan nodes, draw calls, video memory), Network Profiler, and ObjectDB snapshots (4.6+: diff two snapshots to find leaks).
- Code:
Performance.get_monitor(Performance.TIME_PROCESS),RENDER_TOTAL_DRAW_CALLS_IN_FRAME,OBJECT_NODE_COUNT,OBJECT_ORPHAN_NODE_COUNT. Add your own withPerformance.add_custom_monitor(&"game/enemies", callable). - Native profilers (4.6+): Tracy, Perfetto (Android default) and Apple Instruments can see GDScript, C# and GDExtension frames. Use them for frame-time spikes.
- CLI:
--profiling,--gpu-profile,--print-fps,--benchmark. Use--fixed-fps 60 --quit-after Nfor repeatable runs. - Leaks: orphan nodes are nodes removed from the tree but never freed.
Node.print_orphan_nodes(),get_orphan_node_ids()(4.5+).
CPU: do less work
- Disable processing you don't need:
set_process(false)/set_physics_process(false)when idle.VisibleOnScreenEnabler2D/3Dpauses off-screen actors. Timers beat per-frame polling. - Per-frame code is the hot path. Cache nodes in
@onready/_Ready. UseStringNameliterals (&"jump") for actions, groups and method names. Don't callget_tree().get_nodes_in_group()every frame. Use typed GDScript (typed opcodes are faster). - Signals and
call_groupare cheap for events, but don't emit them per entity per frame for thousands of entities. - Thousands of things: stop using one Node per thing.
- Visuals:
MultiMeshInstance3D/2D(one draw call; writemultimesh.bufferin bulk), or GPU particles. - Logic: plain arrays and structs in one manager script (data-oriented), not a script per entity.
- Physics:
PhysicsServer2D/3Dbodies and areas without nodes, or one raycast batch per frame. - Rendering without nodes:
RenderingServerinstances and canvas items.
- Visuals:
- Physics: keep
physics_ticks_per_secondat 60 unless the game needs more. Use simple primitive shapes, and avoidConcavePolygonShape3Don moving bodies. Layers and masks cut pair checks. Let bodies sleep (can_sleep).
Threads
WorkerThreadPool.add_task(callable)/add_group_task(callable, count)(parallel for), thenwait_for_task_completion(id). That's better than rawThreadfor most jobs.- Scene-tree rule: nodes inside the tree may only be touched from the main thread, unless they're in a thread group (
process_thread_group = PROCESS_THREAD_GROUP_SUB_THREAD, which processes that subtree in parallel and usescall_deferred_thread_groupfor cross-group calls). From worker threads, hand results back withcall_deferred/Callable.call_deferred(). Assert withThread.is_main_thread()(4.7). - Shared data: guard it with
Mutex, or give each worker its own slice and merge on the main thread. - Background loading:
ResourceLoader.load_threaded_request(path, "", true)uses sub-threads for dependencies.
GPU and rendering
- Draw calls: merge static meshes and share materials, because each unique material on a mesh surface adds calls. Use MultiMesh for repeats and texture atlases in 2D.
- Lights and shadows are the usual GPU hogs. Use few shadowed omni and spot lights, keep
directional_shadow_max_distancesmall, and bake static lighting (LightmapGI). - Overdraw: big transparent particles and full-screen alpha. Use alpha scissor or hash for foliage and smaller particle quads.
- Scale detail: LOD (
mesh_lod_threshold),visibility_range_*, occlusion culling, and resolution scaling (FSR, MetalFX) on weak GPUs. Pick the right renderer: Mobile or Compatibility for low-end (seegodot-3d-rendering). - Shader hitches: shader baker (export option), fewer material variants.
Loading and memory
preloadloads at script load and blocks. Use it only for small things you always need.loadis lazy. Threaded loading suits levels.ResourceLoadercaches resources. Reuse them, and don'tduplicate()shared resources unless you need per-instance state.- Textures: VRAM-compressed import (default for 3D; enable for big 2D). Mipmaps for 3D. Limit max size per platform. Audio: Ogg streams for long tracks.
- Free what you spawn:
queue_free()and pools for bullets. Watch the orphan count stay flat.
GDScript vs C#
- GDScript is fine for gameplay. Move tight math loops (pathfinding, procgen, simulations) to C# or GDExtension, and still batch API calls.
- C#: avoid per-frame allocations (LINQ, closures, string formatting,
new Godot.Collections.Array). Every Godot API call crosses an interop boundary, so batch them. Packed arrays copy when they cross that boundary.
Platform budgets (rule of thumb)
Mobile: < 100–150 draw calls, 1 shadowed light, Mobile or Compatibility renderer, 30–60 FPS target. Web: Compatibility renderer, single-threaded unless the export uses threads (needs cross-origin isolation headers), and keep downloads small. Desktop or console: Forward+, profile on the minimum-spec hardware.
Perf HUD + custom monitors, MultiMesh crowd, parallel group task, server-side bullets (compiled by the tests): references/patterns.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

