"UpdateUILayouts" triggers when updated UI is disabled or invisible, causing unnecessary processing

UIs continue to trigger UpdateUILayouts in the microprofiler when the updated elements are invisible or when the root ScreenGui is disabled.

References:

Reproduction file: Bug.rbxl - view microprofiler while running - chat commands:

  • reset: Enabled = true, Visible = true
  • disable: Enabled = false, Visible = true
  • invisible: Enabled = true, Visible = false
  • fulldisable: Enabled = false, Visible = false

This is causing a ton of unnecessary processing (~2ms on a very high-end machine) in some of my games due to animated UI content, forcing me to now implement deeply unintuitive workarounds such as deparenting SurfaceGuis at distance and deparenting menu UIs when invisible.

Expected behavior

I expect UpdateUILayouts to not trigger if any ascendant UI objects are disabled or invisible. Would be nice if it only re-processed when Visible or Enabled is set to true again.

10 Likes

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

5 Likes

Any updates on this? (I understand it is holidays break right now but it would be nice to have this checked afterwards)