"UpdateUILayouts" / "Text Shaping + Layout" MicroProfiler help

I’m doing some optimizations on my game and they’re going really well but this one thing called “UpdateUILayouts” starts to take really long in the MicroProfiler whenever I rotate my camera around (it seems)

When I keep my camera still or walk in one direction without rotating the camera it seems fine.

Anyone have a clue of what this is or what it’s caused by? And how to fix it?

Is this because of the minimap you have?

No, even after disabling it, it persisted. I tried looking in another game that has a similar minimap, The Wild West, and they don’t have that problem, and I’ve fixed everything I’ve thought could be a potential problem since making this point, but it still persists. I just need to know what exactly “UpdateUILayouts” is / what it’s caused by

Did you ever find the cause of this?

It’s causing massive performance hits for my game.

Make sure all your BillboardGuis aren’t set to infinite max distance, only set them to what they need to be

I had left a lot of BillboardGuis on infinite MaxDistance (because I’d use magnitude checks to disable and enable the UI in them) and disable/enable the BillboardUI itself.

What’s weird though is that Roblox still renders / draws BillboardGuis even when they’re disabled :neutral_face:

So to get rid of the problem, again, make sure your BillboardGuis are not set to infinite max distance unless absolutely needed

4 Likes

My game is a tycoon and I use quite a bit of BillboardGuis to display information about items.

I made the connection between this issue and BillboardGuis early on and did what you said, however it’s still causing MP spikes. I have MaxDistance set around 50.

What’s weird though is that Roblox still renders / draws BillboardGuis even when they’re disabled

That is really weird behavior. This issue started a couple months ago, possibly a bad Roblox update?

1 Like

Were you ever able to come across a solution to this? Currently experiencing this in my game as well. As player count goes up, so does the lag. Here’s a shot from the MicroProfiler.

I ended up reducing the amount of BillboardGuis I was using, I never found anything other than that though that helped with my specific case

1 Like