Search Unity

Profiling on Android device get spikes of 20ms on VSync?

Discussion in 'Universal Render Pipeline' started by MikeMnD, Dec 22, 2020.

  1. MikeMnD

    MikeMnD

    Joined:
    Jan 17, 2014
    Posts:
    13
    upload_2020-12-22_15-44-29.png

    Check the attached screenshot with the profiler data.

    So I did a profiling session on device Samsung Galaxy 9 and Android OS 10.
    Generally I'm quite happy with the performance but sometimes on scroll or on a UI popup showing I get these spikes to 37ms.

    As Profiling in editor is not very trust worthy about timing I did a Debug build on device and auto connect the profiler. So the game runs with an average of 57fps.

    Still I don't know enough about the WaitForTargetFPS - could I do some optimization to avoid these spikes or or is this the normal behavior?
     
  2. MikeMnD

    MikeMnD

    Joined:
    Jan 17, 2014
    Posts:
    13
    OK so a day later and some searching I found this:

    Still will be glad for more discussions or materials about URP and mobile optimization trough the analytics from the profiler.
     
  3. JonPQ

    JonPQ

    Joined:
    Aug 10, 2016
    Posts:
    120
    It would be nice if the profiling markers all excluded the Vsync time (especially on mobile) time, as they make it very difficult to get meaning full data out on mobile, as many mobile devices are locked to 60 fps and it makes the numbers hard to interpret. https://docs.unity3d.com/Manual/profiler-markers.html#rendering
     
  4. alexeyzakharov

    alexeyzakharov

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

    We are planning to release a version of Profile Analyzer with VSync (or other markers) removal functionality from analysis.
    And I've added your idea of doing the same in the profiler via https://portal.productboard.com/z8pw2ms6jxytyez9chlmm4kr/tabs/41-profiling - feel free to submit other feedback there too!
     
    MartinTilo likes this.