Search Unity

PostLateUpdate.PlayerUpdateCanvases shows different CPU overhead while using Deep Profile or not.

Discussion in 'Editor & General Support' started by ArcherLew, May 31, 2019.

  1. ArcherLew

    ArcherLew

    Joined:
    Mar 30, 2016
    Posts:
    14
    I am profiling In the same game scene :
    1) if i use deep profile , RectMask2D.PerformClipping contribute 70ms cpu usage, and the PostLateUpdate.PlayerUpdateCanvases contribute 100ms.
    2) if i do not use deep profile, the PostLateUpdate.PlayerUpdateCanvases contribute less than 1ms, and RectMask2D.PerformClipping cannot been watched.

    In my oppinion, the using deep profile or not should just cause the Profiler.FinalizeAndSendFrame overhead. How can that affect PostLateUpdate.PlayerUpdateCanvases overhead ?

    the two pic below is my profile screenshot while using deep profile or not
     

    Attached Files:

    alexeyzakharov likes this.
  2. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    Thanks for the question!

    Technically it should not. But deep profiling adds a significant overhead which might skew the update time of UI update. But I would probably expand the whole tree (with Alt+Mouse) and chek what is the leaf of the call tree.

    Profiler.FinalizeAndSendFrame takes snapshots of subsystems in order to display data on charts in the ProfilerWindow.
    Some of those areas might introduce a large overhead (you should be able to see timings for some areas if you expand the sample).

    Which version of Unity do you use? In >=2018.3 you can disable data collection for the areas if you close the correspondent chart in the Profiler Window. Typically closing UI, Audio and Memory charts should get the Profiler.FinalizeAndSendFrame time close to zero.
     
    Andrey-Postelzhuk, bgrz and ArcherLew like this.
  3. ArcherLew

    ArcherLew

    Joined:
    Mar 30, 2016
    Posts:
    14
    Thank you very much for replay me so much ! :D

    You are right, when I restart my PC some times, the PostLateUpdate.PlayerUpdateCanvases overhead disappear even in deep profile mode, but I dont know why. Next time it appear i' ll expand whole tree and try to find the reason.

    And my unity version is 2017.1.p2, so seems cannot use the new feature.
     
    alexeyzakharov likes this.