Command Palette

Search for a command to run...

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

roblox-performance

БесплатноБез исполняемых скриптовНе проверен

Performance diagnosis and optimization - MicroProfiler, Script Profiler, Developer Console, Scene Analysis, Luau heap and memory categories, memory leaks…

EL4CTEOот EL4CTEO★ 169 звёзд на GitHub

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

Roblox performance

Measure before optimizing. Identify whether the bottleneck is server compute, client compute (CPU/GPU), memory, network, or load time, then use the matching tool.

Tools

Tool Open Use for
Developer Console F9 (in game) Errors, server/client memory by category, network, script activity. Works in live servers.
MicroProfiler Ctrl+Alt+F6 (⌘⌥F6); Dev Console for server Per-frame timing; spikes; dump a frame for detail.
Script Profiler Studio / Dev Console Which functions consume Luau time (sampling).
Luau heap snapshots Dev Console → Memory → Luau Heap What tables/closures/instances are held and by what (leaks).
Scene Analysis Studio Script memory, unparented instances (leaks), instance composition, audio/animation memory, triangles. Also SceneAnalysisService via Studio MCP.
Performance Stats / Debug Stats Ctrl+Alt+F7 / Shift+Ctrl+F1–F5 Live CPU/GPU/memory/network overlays.
Network Simulator Studio Device Simulator toolbar Test with latency, jitter, packet loss (3G/4G/Wi-Fi profiles).
Performance dashboard Creator Hub Live aggregate FPS, server heartbeat, memory, crash rates by device.

Label your own code in the MicroProfiler and memory views:

--!strict
local RunService = game:GetService("RunService")

debug.setmemorycategory("EnemyAI") -- memory allocated by this thread is attributed to "EnemyAI"

RunService.Heartbeat:Connect(function(_deltaTime)
	debug.profilebegin("EnemyAI.think") -- shows as a labeled bar in the MicroProfiler
	-- ... work ...
	debug.profileend()
end)

Targets

  • Client: 60 FPS on mid-range phones (≈16.6 ms/frame); many players are on low-end Android.
  • Server: heartbeat near 60 Hz; Stats (workspace:GetRealPhysicsFPS(), Dev Console Server Stats).
  • Memory: mobile clients crash from OOM first. Keep client memory well under ~1–1.5 GB on low-end devices; watch PlaceMemory, LuaHeap, GraphicsTexture, Sounds, Animation categories.
  • Server OOM: game.ServerLowMemoryWarning fires (server only, live servers and Team Test, not Studio playtests) when memory leaves normal levels, then every 60 s while it stays high. Use it to free memory fast (destroy debris/effects, pause spawning, unload empty map areas) and log it; it frees nothing itself.
--!strict
game.ServerLowMemoryWarning:Connect(function()
	warn("Server memory high: cleaning up")
	-- e.g. destroy temporary effects, pause NPC/item spawners until memory recovers
end)

Most common problems → fixes

Symptom Usual cause Fix
Memory grows over time Leaked connections, tables keyed by players/instances, destroyed-but-referenced instances, unparented instances Disconnect/clean up per player & per character; clear tables on PlayerRemoving; use Scene Analysis "unparented instances" and heap snapshots.
Server lag with many players Per-player loops each frame, while true do task.wait() end loops, heavy remote handlers, physics of many unanchored parts Event-driven code, one scheduler loop, throttled think rates, anchor static parts, server-own fewer assemblies.
Client FPS drops Too many parts/draw calls, shadows from many lights, transparency/particles overdraw, per-frame UI updates Merge/instance meshes, CastShadow = false on small parts, fewer shadowed lights, limit particles, update UI on change only.
Spikes every N seconds Autosave/GC bursts, synchronized loops across players, big Clone()s Stagger with random offsets; pool objects; spread work across frames.
High ping / rubber banding Remote spam, large payloads, replicating many property changes Batch, delta-compress, throttle; tween on clients; see roblox-networking.
Long join times Huge place, many unique assets, no streaming Streaming, SLIM LOD, fewer unique meshes/textures, ContentProvider:PreloadAsync only for critical assets.

Luau hot paths

  • Cache services, instances, and RaycastParams outside loops; avoid FindFirstChild/GetDescendants per frame. Replace GetDescendants scans with tags (CollectionService) or maintained sets.
  • Use deltaTime from Heartbeat/PreSimulation rather than task.wait() loops for per-frame work.
  • Avoid creating closures/tables per frame in hot loops; reuse buffers with table.clear.
  • --!native (whole script) or @native (per function) for math-heavy code; typed parameters help the native compiler. Don't blanket-enable: compile time and a global native-code memory limit.
  • --!optimize 2 is how Roblox compiles live games already; don't rely on Studio timings for micro-benchmarks.

Rendering and assets

  • Parts: fewer, larger parts; MeshParts with shared MeshId are instanced (cheap); unions (PartOperation) can be expensive — check triangle counts in Scene Analysis.
  • RenderFidelity = Automatic/Performance for detailed meshes; CollisionFidelity = Box/Hull for de
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

references/profiling.md

FAQ

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

Performance diagnosis and optimization - MicroProfiler, Script Profiler, Developer Console, Scene Analysis, Luau heap and memory categories, memory leaks, network/replication cost, rendering and physics cost, streaming, native codegen, Parallel Luau with Actors. Use when a game lags, stutters, drops FPS, crashes on mobile, has high ping, or before optimizing hot code.

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

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

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

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить roblox-performance с