agentleFS
szlayszlay/roblox-base/.claude/skills/roblox-performance/SKILL.md

roblox-performance

Skill1 starsChanged 4 months agoMITView on GitHub

Use when profiling Roblox performance or diagnosing FPS, memory, network, mobile, or hot-path problems, including MicroProfiler and optimization.

3 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 4

    Distinctive

    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
  1. Distinctive:

    Use when profiling, diagnosing lag, optimizing hot paths, or setting performance budgets.

    line 15
  2. Distinctive:

    Use Actors only after profiling identifies isolatable CPU work.

    line 39
  3. Distinctive:

    Keep < 5000 visible parts.

    line 63
  4. Distinctive:

    Use CanvasGroup for UI batching.

    line 64

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Roblox Performance

When to Load

Use when profiling, diagnosing lag, optimizing hot paths, or setting performance budgets. Load if the user mentions FPS drops, memory issues, network bandwidth, or mobile optimization.

Quick Reference

Profiling Tools

  • MicroProfiler (Ctrl+F6) — Per-frame breakdown: scripts, physics, rendering. Primary tool for finding what's slow.
  • Developer Console (F9) — Stats tab: memory, network, render stats. Server Stats for server-side metrics.
  • Script Profiler (Ctrl+Alt+F5) — Per-script CPU usage and heap allocations.

Performance Targets

MetricTargetHard Limit
Server heartbeat< 16ms< 33ms
Client FPS (desktop)6030
Client FPS (mobile)4530
Memory (mobile)< 800MB< 1.2GB

Optimization Patterns

  • Throttle Heartbeat — Batch expensive work at fixed intervals (10/sec, not 60)
  • Cache references — Store workspace lookups in variables, avoid repeated FindFirstChild
  • Spatial partitioning — Distance-based activation instead of checking all entities
  • Lazy loading — Stream content from ServerStorage as player approaches

Parallel Luau

  • Use Actors only after profiling identifies isolatable CPU work.
  • Workers compute; synchronize before restricted DataModel writes.
  • SharedTable and mutexes add coordination cost; they do not replace ownership boundaries.

Object Pooling

-- Core pattern: pre-clone, reuse, avoid GC pressure
local Pool = {}
function Pool:get(): Instance
    return table.remove(self._available) or self._template:Clone()
end
function Pool:release(obj: Instance)
    obj.Parent = nil
    table.insert(self._available, obj)
end

StreamingEnabled Essentials

  • On by default for new places. Only BaseParts stream; Folders, ModuleScripts, RemoteEvents load at join.
  • Streamed-out = parented to nil, not destroyed. Luau refs persist if it streams back.
  • Config: StreamingTargetRadius (start 256, tune down for mobile), StreamingMinRadius (~64).
  • Gotcha: FindFirstChild("DistantPart") returns nil if streamed out. Use WaitForChild with timeout.

Mobile Quick Wins

  • Keep < 5000 visible parts. Textures max 512x512. Cap particles at 50 emitters.
  • Use CanvasGroup for UI batching. Consider disabling GlobalShadows.

MCP verification: collect a baseline and inspect runtime counters after changes. Need more detail? Load references/full.md for the complete reference with code examples, API tables, and edge cases.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.