I’m profiling some low frame rate issues on Android. The bulk of the frame on slow frames is happening in PostLateUpdate.FinishFrameRendering(). The issue I’m having however is not all frames seem to take the same or similar time. Some frames are fast and PostLateUpdate.FinishFrameRendering() completed in 6ms, other frames are slow and PostLateUpdate.FinishFrameRendering() can take up to 23 ms or more. What is strange to me is that all sub functions scale the time they take when a slow frame happens So there’s not a single thing that appears slow, I cannot figure out why.
Any advice about how to debug this would be great!
Here are a couple screen grabs from the profiler. These two frames happen one after the other and are rendering almost identical objects on screen.
Ah of course, I forgot about setting 32-bit Display Buffer to off under Player Settings>Resolution and Presentation. Turning that off boosted my frame rates by 80
The 32-bit Display Buffer check box isn’t available in the latest versions of Unity. Your performance hit is now mandatory. I only noticed this because of lag in executable build and not within editor.
Canvas.BuildBatch eating up CPU is a bug. Unity representative, “We applied a fix to 2020.1 and 2019.3, but it has caused problems which have not yet been fully diagnosed/fixed. Therefore we have delayed backporting the fix to 2018.4 until this other issue is resolved.”
So if you’re in mid development, perhaps ignore this for time being until a stable fix has been released, otherwise following comment above, use the backport fix and attend to anything broken in engine version swap.
See more here,
For those stumbling upon this thread and are having performance issues due to canvas, check this post out,
late to this party … and have the same issue … apologies but I’m still unclear on what the fix for this is? … switching back to an older version of Unity, I’m using 2020.1 and still seem to have the issue?