Search Unity

UGUI.Rendering.UpdateBatches (2018.3.12f1) only in build

Discussion in 'UGUI & TextMesh Pro' started by TheDemiurge, Apr 24, 2019.

  1. TheDemiurge

    TheDemiurge

    Joined:
    Jul 26, 2010
    Posts:
    42
    So, I'm trying to profile our game. And I've run into a very strange issue, where this part of the UGUI update (in purple) is taking an insanely long time, but ONLY in the build, as seen below:

    upload_2019-4-23_18-17-41.png

    Here's a shot of the same exact thing but in the editor:

    upload_2019-4-23_18-19-19.png


    I've profiled the build just earlier today and this wasn't happening, as well as before today. I'm really not sure what's going on.

    ** Bonus points if someone can help me figure out why all the tiny drawing and culling jobs - CullingGroup and other stuff - are so far delayed and spaced apart. We have a whole lot of manually drawn instanced meshes that are both in the game camera and the scene camera, but I'm not sure that alone explains those huge gaps.

    Edit: I forgot to mention, both cases are on a PC with an i7-8700 with a gtx 2070..
     
    Last edited: Apr 24, 2019
  2. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    We have had the same problem for a long time. Our UI takes up 30%-40% of our games CPU time. It is completely insane.
     
  3. TheDemiurge

    TheDemiurge

    Joined:
    Jul 26, 2010
    Posts:
    42
    So it looks like this only happens when the GPU profiler is open..
     
  4. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    Interesting, good info. I have not measured our Cavas overhead without the profiler active.
    Unfortunately, such a measurement is a non-trivial task.
     
  5. TheDemiurge

    TheDemiurge

    Joined:
    Jul 26, 2010
    Posts:
    42
    We have several canvases, but they haven’t been an issue. I wasn’t profiling them, though, just various performance improvements, when that showed up. It definitely seems like a bug or something.
     
  6. ozonex

    ozonex

    Joined:
    Dec 7, 2012
    Posts:
    22
  7. TheDemiurge

    TheDemiurge

    Joined:
    Jul 26, 2010
    Posts:
    42
    Could be related. I have the editor keep the game view at 1080p but I run the standalone at 1440p most of the time.