Map making memory skyrocket?

Hey, I have quite a large map with frankly thousands of parts.

I’ve noticed that this map has started to result in quite the memory build-up, as the moment the map is inserted inside my game, my memory jumps by almost 1000 MB.

Certain stuff has also started lagging because of this, and with memory over 3000 MB in my game, it’s just something I cannot let sit by.

If anybody has any suggestions on how I can fix this, please let me know.

1 Like

First of all, are there scripts in your game? If so please tell us as there could be memory leaks.

Second of all, go through your map’s baseparts. Is there any basepart that is unanchored or that can collide? If so please check if they SHOULD or NEED to be.
Sometimes we add collisions and unanchor objects that just worsen performance and do not need those properties.

There is scripts in my game. But I added all the scripts inside a baseplate and the game ran fine. The issue came when I inserted the map.

All my maps parts are anchored and everything that should have collision has collision. I don’t think any objects have cancollide false actually.

Does the map have terrain? Could you upload an image of the map? Does this happen to you on more devices, and outside roblox studio?

No terrain. Just parts. This game is PC only and yes this is inside and outside of roblox studio.

On top of that, other players have the same issue on their PC.

Do you mind sending the file of the world over here or discord?

I am asking because of an image and words it isnt very narrowing down the problem

HUGEMAP.rbxm (1.8 MB)
Add me on discord if you can as well, since it’s a much faster response.

aidenn#7806

Do the Trees have collisions on? How much would the memory drop if you turn their collisions off?

You might’ve used some free model that has a virus in it. You could run some code in workspace for trying to find it

local d = workspace:GetDescendants() for i,v in pairs(d) do if not v:IsA("BasePart") then print(v) end  end
1 Like

All it prints is some SpotLights. I never used free models so I was skeptical but I tried it just to be sure.

Lights can be resource intensive, but that’s probably not it. I’ll have a look at that map for you

The memory didn’t even really drop when I turned off tree collision. It was about 50ish MB less than normal.

lol it’s probably because you have like … 50.000 instances

how exactly should I go about reducing or fixing that?

I tried selecting all loose parts … crashed.

You could try unioning parts together, that is more efficient than loose parts. Preferably you’d just import meshes

Oh yea you could try export to blender and import as fbx

So unioning parts together is one option, and the other I should import the map into blender and then re-export as FBX?

Well looking at the game … I deleted the entire map and it changed nothing for me (memory wise). Says the map is taking up 1000mb, could probably shave some off there.

If nothing else works, download more ram!

Then its most likely a script, unless you forgot a piece of the map.

Nope. I cleaned out the entire game.