Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

UGUI.Rendering.UpdateBatches performance still bad

Discussion in '2018.1 Beta' started by Prodigga, Feb 14, 2018.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    When we move a transform that is parented to a lot of UI elements, we see a large spike in UpdateBatches.




    The game object we are moving is a canvas, and it had 4 children which are themselves canvases that contain lots of UI elements.

    When we move the root canvas, it causes this performance issue.

    It is very confusing since nothing is changing. I am not touching the subcanvases. I am just moving the transform they are childed to. The contents of the subcanvases are not changing, so it shouldn't have to recalculate anything. Just render the same content?

    Infact, I just did a test. I childed my entire UI hierarchy under a new GameObject. If I move that GameObject, it still causes UpdateBatches, even though I am just moving around a regular game object with no canvas or anything. It seems to cause trigger UpdateBatches anyway.

    The performance issue is so bad that our game goes from running at 60FPS with a lot of room to spear (See how much yellow VSync there is?) so running at 30-40 fps until the root canvas stops moving.

    This has been reported multiple times in claimed fixed before but seems it hasn't been ported forward ?

    Its very hard to keep track of what is a new regression and what is fixed but not yet implemented.

    https://forum.unity.com/threads/ugui-rendering-updatebatches-performance-regression.496849/

    https://forum.unity.com/threads/ugu...s-performance-regression-continuation.501780/
     
    VoodooDetective likes this.
  2. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Submitted case 1002035

    To Unity devs: submited a simple example scene. Multiple pages with lots of dummy content. I tried to replicate our game setup as close as possible. You can see the spikes in the profiler while the pages are moving. (Click Page Up and Page Down)

    Again, I am only moving the transform that holds the pages. The pages themselves are their own canvases. I am never touching them, yet I incur this massive performance hit anyway.
     
    Last edited: Feb 14, 2018
  3. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Thought I would give this one a bump since it seems like a pretty big deal!
     
  4. ShantiGaudreault

    ShantiGaudreault

    Joined:
    Aug 17, 2015
    Posts:
    9
    Hi Prodigga,
    we improved the performance.
    The fix will get into 18.1, in first patch if not in first release.
    Thanks for reporting.
    Shanti
     
    Last edited: Mar 19, 2018
    Claytonious and Havokki like this.
  5. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
  6. MarcAudouy2

    MarcAudouy2

    Joined:
    Aug 9, 2017
    Posts:
    6
    @shantigaudreault is there a way we could get this patched on 2017.3 ?

    we are getting close to shipping a game and we noticed this issue, we use some UI elements in VR that move relative to the player camera (they're not anchored to the head but still move) and the UpdateBatches easily takes between 2 and 4ms depending on how many elements are enabled at the time, which is a major problem trying to reach 60fps (on PSVR)
    we are using 2017.3.1p4 and we cannot realistically upgrade to 2018 this late in the project, especially if it's still in beta.