Search Unity

UI causing huge performance drop on 2017.3.0f3 - Profiler blames UGUI.Rendering.UpdateBatches

Discussion in 'iOS and tvOS' started by fcloss, Jan 25, 2018.

  1. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    192
    Hi all,

    I have just migrated my project to 2017.3 but i am unable to move on to deployment as there is a big performance issue, FPS dropped from 30 fps (limited on purpose) to 15-20fps.

    On the profiler it shows that most of the time/processor is on UGUI.Rendering.UpdateBatches as shown here;

    upload_2018-1-25_1-17-14.png

    I have found on the forum that the problem existed on 2017.2 but should have been fixed on 2017.3, but, at least for me, it is not:

    https://forum.unity.com/threads/ugu...-regression-continuation.501780/#post-3287166

    https://forum.unity.com/threads/ugui-rendering-updatebatches-performance-problem.504553/

    Is anyone else facing it? I saw that the problem was supposed to be on ContentFitter with LayoutGroup, which I have several on same GO in the scene.

    @LeonhardP, do you have any update on this? I saw on the other posts that you were handling the issue, but the threads ended with no final confirmation of the solution.

    I really appreciate any help, solution, workaround or nice words.

    Thanks in advance,
    Fernando
     
  2. paradizIsCool

    paradizIsCool

    Joined:
    Jul 10, 2014
    Posts:
    178
    fcloss likes this.
  3. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    We are experiencing performance problems in UpdateBatches as well.
    Any tips on how to reduce the cost would be greatly appreciated. Is it caused by something moving and needing to be recalculated?
     
  4. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    192
    Check the links i've added on my initial message, besides it, rolling back to 5.6.3 made the app back to its normal fps. So it really seems to be a problem with 2017 versions, as stated on the links too.
     
  5. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    192
  6. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    I experience massived performance hits related to ContentSizeFitter (albeit in combination TextMeshPro) as well. In the end, I ended up writing scripts that manually managed the width and placements of labels based on content character length instead. It's definitely more work and the result isn't as nice - but at least I don't encounter 10ms processing spikes every time I update the UI.
     
  7. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    192
    Thanks George! The issue seems to be ContentSizeFitter, at least this is the cause discussed on the beta forum. Unfortunately there is no reply from anyone from Unity and the issue tracker keeps saying fixed in a future release: https://issuetracker.unity3d.com/issues/content-size-fitter-causes-large-performace-slowdown

    It upsets me a lot, the issue may exist but not lost as this one.
     
  8. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    One improvement that we discovered was to switch to screen space overlay from camera space canvases. Unfortunately that disables MSAA which we use with our SVG assets.
    We still get heavy hiccups every time something changes, but before we were getting the hiccups every frame.
    It would be nice if camera canvases didn't cause batches to be updated each frame or if screen space overlay canvases supported MSAA
     
    fcloss likes this.