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

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:

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

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…

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.

So it looks like this only happens when the GPU profiler is open…

Interesting, good info. I have not measured our Cavas overhead without the profiler active.
Unfortunately, such a measurement is a non-trivial task.

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.

We have similar issue, and we are sure its not just in profiler. On some devices game uses a lot of CPU for no reason. We also reproduced that in editor but at higher resolutions than in build. On every device it works in different way but we was unable to find what exactly cause it.

Could be related. I have the editor keep the game view at 1080p but I run the standalone at 1440p most of the time.