Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Framerate drop due to increasing VSync times

Discussion in 'Android' started by PPE-TrackMan, Jul 14, 2021.

  1. PPE-TrackMan

    PPE-TrackMan

    Joined:
    May 4, 2021
    Posts:
    9
    Hi,

    We have a simple android game which suddenly slows down a lot, to under a frame a second. It happens at random, sometimes five minutes after the game has been launched, sometimes it hasn't happen after 20 hours. The game is under the specs of the used device and the log files do not show any exception/errors.
    I finally got a few frames of profile data for it. It can be reached here:
    https://trackman-my.sharepoint.com/:u:/p/ppe/EZF_kOlUOWlOpzX8aKW4Ee8BnRcgY9DULEvHGPR5K70ybA?e=QXy016

    Two data points, first frame VSync = 7850 ms and last frame(17) VSync = 443472 ms.
    upload_2021-7-14_10-53-20.png

    upload_2021-7-14_10-53-8.png

    We do use Application.targetFrameRate = 30, We set it on an gameObject in the first loaded scene, in the start.

    Do anyone have any idea of how to approach this bug a little further?

    Any help is appreciated.

    Best regards Povl
     
  2. PPE-TrackMan

    PPE-TrackMan

    Joined:
    May 4, 2021
    Posts:
    9
    So update. Got a tip about some deep profiling and turning of VSync for android.
    It turns out it is related to Semaphore.waitForSignal:
    upload_2021-7-15_9-35-23.png
    All other threads seems to idle as well, when looking at the timeline view:
    upload_2021-7-15_9-38-1.png

    Any ideas would be much appreciated.
     

    Attached Files: