Large performance hit from UpdateUILayouts

HIGHLIGHTS

  • Large performance hit to UpdateUILayouts as of 03/19/24 (from 0.5 → 17ms)
  • Seems to be an issue that only happens to some PCs (doesn’t happen to my teammate)
  • Upon resizing an element in a UI, every other element size is recalculated.
  • Attached a reproduction place with the UI shown in the Microprofiles below under the private message section. I see an identical issue in that test place, my teammate still does not have the performance issue.
  • “Deeply nested UI” about 12 elements deep at the most.

Recently I’ve noticed really massive UpdateUILayout jobs running in the Microprofiler. In my game, I have deeply nested UIs with thousands of elements overall. In my game in studio during a local test UpdateUILayout takes around 17ms to complete and runs every time any element in the UI is resized (seems to be worse the higher up in the hierarchy the element is). This seems like a recent issue within the last two days or so 03/19/24 and I’ve not really been able to solve the issue. When my teammate tests his UpdateUILayout, under identical conditions, take about 0.5ms.

This issue seems to only happen in studio, under any test I’ve tried Team Test, Solo Test. Running the game online runs exactly as I would expect with around 0.5ms UpdateUILayouts times.

Here’s what I see in the MicroProfiler
image
image

Here’s what my teammate sees in the MicroProfiler
ucQsO8y

I’ve attempted to reinstall Roblox studio but that didn’t seem to do anything for me.

System Specs:
CPU: Ryzen 7 3700x
GPU: Nvidia RTX 3070
RAM: 64GB DDR4 3200MHz
OS: Windows 11

Microprofile from my game:
log_C44CE_microprofile_20240321-120233.html (3.7 MB)

A private message is associated with this bug report

3 Likes

Hi @CompilerError , could you please share a file that includes some of the UI in your game where you noticed big difference in performance? Although overall, we’d not recommend using very deep nested UI hierarchy.
Thank you!

I believe I included the place file in the private message section of the post. It has the exact UI that I showed in my micro profiles.

Thank you for your report! We have further optimized the “dirty” state of UI layout elements.