Major FPS drops and performance?

Hey Devforum, could anyone here point to exactly what is causing the massive FPS drops?

Is it textures? Or is it the sheer scale of the map?

The map is around 58,000 parts, and 100,000 instances.

F9 > Micro profiler > Client

Buildings are around 15-20 mesh parts/parts with around 20 textures each (for the roof)

Appreciate the help from anyone!

1 Like

Things that can cause lag

  • Moving parts
  • Clustered parts in one place
  • Unanchored falling parts
  • Render distance too high

Things u can do about it

  • Anchor all parts and remove any that are not visible
  • Make your own renderer for better performance
  • Add Fog
1 Like

It appears to have something to do with rendering.

“Scene” is taking a really long time(shown from microprofiler). Perhaps you can try turning on StreamingEnabled under workspace properties?

1 Like

Perhaps wait for multithreading?
The engine is single threaded, and is a miracle it works as well as it does.
They tried to make the rendering pipeline multithreaded with limites success.

@Judgy_Oreo
StreamingEnabled is a good workaround… Okay it’s the only workaround, other than fog that @kalabgs mentioned.

I mean, you can technically use multithreading with Parallel Lua, but as far as I know Roblox doesn’t internally use multithreading, (I’m pretty sure they use parallelization for rendering though, there’d be a lot of artifacts if a pixel was colored one at a time).

The only reason I mentioned StreamingEnabled was because of it’s mesh LoD feature and how it unloads things in chunks far enough away from the player. It was a simple solution, and I’m pretty sure a world chunking system could also fix this issue.

1 Like

It can do the job for now, but since its deprecated that’s not a solution for life.

It’s not deprecated??


vs

(deprecated tag missing)

1 Like

Oh what?

I checked that page like 1 week ago and it said its deprecated

My bad then. StreamingEnabled it is

Usually what causes this is unoptimized geometry, unanchored parts, high graphics (an obvious one), StreamingEnabled is off and extremely high quality textures.

Is there a date/roadmap on when multithreading is to be added?

The entire workspace is anchored
We are planning on using streaming enabled, but we’d like to not use it if possible

Making our own renderer might do it, but that will take some time.

Thanks for the suggestions!

@Judgy_Oreo We’d like to first consider not having to use streaming enabled. But yes, if that’s our last resort we will.

The main question I am asking is if there is something within the map that could be causing these FPS drops.

Is tis considered high quality? xD

Enough of anything can cause lag. My guess is that there’s simply too much visible at once. Here are my ideas:

  • If your game can easily be sectioned into areas, you can make a huge cube around each area and do a bit of raycasting so only visible areas are rendered (parent the non-visible areas to something like nil or ReplicatedStorage), or only having a few areas loaded at once (won’t work with games that don’t have many enclosed spaces).
  • If the player is never intended to reach certain areas, you can try simply adding said area to the skybox or creating flat parts with images, or make them with a lower detail (CastShadow and CanCollide being disabled can help).
  • You could try having each area of the game sort of be like a level, with only one being loaded at once.
  • You might find community creations like CullingService better suited for your game than the built-in StreamingEnabled, as it can offer more customizability.

I’m pretty sure Roblox uses multithreading internally, so it wouldn’t help you unless you had a really hefty script that would benefit from parallelization.

What? It would be laggier and time consuming, I don’t suggest this

1 Like