Profiling PostLateUpdate.FinishFrameRendering(). Radically different render times per frame

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.

1 Like

I have this problem as well. PostLateUpdate.FinishFrameRendering is taking 50% of the total CPU usage.

2 Likes

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 :slight_smile:

I’m getting this in webgl… I can’t see the 32bit display buffer setting in the player settings tho?

Bump. Unity Version 2019.3.11f1

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,

1 Like

what do you mean by “backport fix”? @Rickywild

what do you mean @anarcheril ?

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?

2 Likes

I unchecked use default resolution, and that fixed everything

Thanks for replying :slight_smile: … still struggling, apologies for the noob question but where is this setting? do you mean default screen Width and Height?

Hi,have you solved this problem?I have tried 2019.3~2019.4 and 2020.1,still having thie problem.

I am getting the problem in webgl URP. any one has answer or commment?

sorry, I’m just seeing this, it’s in the player settings