[Tutorial] Roblox Optimization Guide - Memory, Draw Calls, and Network Tips

Hey everyone! I just watched this amazing optimization tutorial and wanted to share the key points here since I know not everyone has time to watch a 20+ minute video. All credit goes to the original creator - seriously, go watch the full thing if you can: https://www.youtube.com/watch?v=YWyJHwynM1M&t=2175s

So I’ve been struggling with performance in my game lately and this video was a goldmine. Here’s what I learned:

The Memory Stuff That Actually Matters

First thing - check your memory usage by pressing F9 and looking at the Memory tab. The biggest shock for me was learning about collision fidelity. I had no idea this was eating up so much memory!

Basically, if you go to Studio settings and enable “Collision Fidelity” under Physics Simulation, you’ll see your entire map light up in different colors. More colors = more memory usage.

The fix is pretty simple though:

  • For parts that don’t need collision (like decorative stuff), set CollisionFidelity to “Box”
  • For round objects that need collision, use “Hull”
  • Avoid “Default” and “Precise” unless you really need them

I went through my map and changed a bunch of decorative meshes to Box fidelity and it made a noticeable difference.

Sound Management (This One Surprised Me)

Apparently storing all your sounds in SoundService is actually bad?? I’ve been doing this wrong for years lol.

Instead of having like 50 sound objects sitting in SoundService, you should create them when needed and destroy them after. Something like:

local function PlaySound(id, volume, parent)
    local sound = Instance.new("Sound")
    sound.SoundId = id
    sound.Volume = volume
    sound.Parent = parent
    sound:Play()
    
    sound.Ended:Connect(function()
        sound:Destroy()
    end)
end

Makes sense when you think about it - why keep sounds loaded that aren’t playing?

Draw Calls Are Everything

This is where I learned I was doing everything wrong. Hit Ctrl+Shift+F2 to see your stats and look for “Scene Draw Count”. You want this under 500 (I was at like 800+ :sweat_smile:).

The problem I had was importing meshes that were basically the same but had different MeshIDs. Like I had car wheels that were identical but each one had its own ID, so instead of 1 draw call for all wheels, I was getting 4 separate ones.

Pro tip: Search in Explorer for identical meshes and make sure they all use the same MeshId.

Also particle emitters are evil for draw calls - each one counts as 1 draw call even if they use the same texture. I had to add a distance check to disable particles when players are far away.

The Network Stuff

Your incoming network should be under 50 KB/s according to the video. Mine was way higher because I was doing way too much stuff on the server.

Big mistakes I was making:

  • Tweening parts on the server (big no-no)
  • Playing animations server-side
  • Updating CFrames on the server for visual effects

Now I try to do as much visual stuff on the client as possible and only use the server for important game logic.

Quick Wins I Implemented

Some easy changes that helped immediately:

  1. Set Workspace.PlayerCharacterDestroyBehavior to “Enabled” (prevents memory leaks)
  2. Enable Workspace.ClientAnimatorThrottling
  3. Set PhysicsSteppingMethod to “Adaptive”
  4. Changed MeshPart RenderFidelity to “Automatic” instead of “Precise”
  5. Moved my maps from ReplicatedStorage to ServerStorage (only load them when needed)

The Bulk Operations Thing

If you’re updating a lot of parts every frame (like I was with some spinning objects), use Workspace:BulkMoveTo() instead of setting each CFrame individually. The performance difference is actually crazy.

-- Instead of this:
for _, part in pairs(parts) do
    part.CFrame = NewCFrame
end

-- Do this:
workspace:BulkMoveTo(parts, cframes, Enum.BulkMoveMode.FireCFrameChanged)

What I’m Still Working On

The video talks about using Buffers for custom replication which sounds super advanced but apparently can reduce network usage by like 60x. That’s my next project to figure out.

Also want to implement better LOD systems for my particle effects and maybe look into IK controls for some animations.

Final Thoughts

Honestly this video opened my eyes to how much I didn’t know about optimization. My game runs so much better now, especially on mobile. The creator really knows their stuff and explains everything with actual examples from their game.

If you’re having performance issues, definitely watch the full video. There’s way more detail and visual examples that I couldn’t capture here.

Anyone else tried these techniques? What worked best for your games?

26 Likes