Search Unity

Bug 2020.3.19 onwards - Extremely slow performance

Discussion in 'macOS' started by lukasynthetic, Oct 3, 2021.

  1. lukasynthetic

    lukasynthetic

    Joined:
    May 20, 2020
    Posts:
    30
    Hello. I upgraded my project from 2020.3.18 to the latest LTS 2020.3.19 and everything went to crawl. In Playmode stats show around 58 FPS but it's unplayable - it stutters very badly. I tried another project and that one was even worse - the whole computer nearly hung
    So I did some tests. I created same project in 2019.4.31 LTS. Getting 83FPS!!!
    Created same project in 2020.3.18 LTS - getting around 47FPS smooth.
    I also have bootcamp installed on same machine - 2014 iMac i7 24GB.
    There, on 2020.3.19 achieving same result as 2020.3.18 version on Mac.
    Then I tried latest 2021 available in Hub and this one behaved exactly like 2020.3.19 - very choppy and unresponsive. I checked the profiler - loads of yellow.
    Then did some maintenance. Clean my Mac..... Cleared Library/Cache
    Cleared Caches, Application Support
    Nothing made any difference.
    Render pipeline didn't have effect either as I tried built-in and URP.
    Any ideas please? Really frustrating week...

    Oh last thing,
    In the end I did something unforgivable... I downgraded initial project back to 2020.3.18...
    And I've got my mere 47 back.
     
    Last edited: Oct 3, 2021
  2. BACALL

    BACALL

    Joined:
    Feb 21, 2017
    Posts:
    87
    I got this issue but when updating from 2021.1.20f1 to newer. All newer versions (tested 2021.1.22 and 2021.1.23) have extreme lag even though "Stats" show 120 FPS, but the Game View is so choppy it looks like 5-12 FPS. And V-Sync is broken. The "Stats" bar jumps FPS from 50 to 120, to 80 and 90 every second even though V-Sync is checked... Also the Editor has extreme choppiness when it was smooth before (in version 2021.1.20f1).
     
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,460
    The FPS displayed in the Game View's Stats popup is not comparable between 2019.4 and 2020.3, as it no longer calculates out the EditorLoop. You'll have to use the profiler to get the actual frame rate on 2019.4 for comparisons like this one.

    Going by the release notes, the item that is in range to have impacted this and seems reasonably close to the area you're experiencing issues on is

    Graphics: Fixed performance spikes in OSX while using an external monitor. Metal editor on OSX now uses CVDisplayLink to time frame presents. (1327408)

    Which landed on 2020.3.19f1 (@lukasynthetic ) and 2021.1.22f1 (@BACALL ) and has caused this regression:

    Metal: Stuttering Scene view and Game view when in Play mode
    Frames were being unnecessarily dropped before presenting on Metal OSX when using CVDisplayLink; this is now fixed.
    (1363963)

    Which has been fixed on 2022.1 and 2021.2.0b15 with backports to 2021.2.x and 2020.3.x in progress.
     
    BourbonBristles and BACALL like this.
  4. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    I've found the thread while looking for the similar reports. Both 2020.3.19 & most recent 2020.3.20 behaves the same, so I assume back ports not released yet.

    Currently last workable version for me is 2020.3.18 LTS.
     
  5. Tanky

    Tanky

    Joined:
    Jun 19, 2015
    Posts:
    6
    For MacOS users looking for help: a temporary workaround can be found here
     
  6. lukasynthetic

    lukasynthetic

    Joined:
    May 20, 2020
    Posts:
    30
    Same here. At least Unity team is aware of it and hopefully we'll see a fix soon.
     
  7. lukasynthetic

    lukasynthetic

    Joined:
    May 20, 2020
    Posts:
    30
    Thanks for that, although I'll stick with 2020.3.18 until we get it sorted.
     
  8. Pheck

    Pheck

    Joined:
    Jul 9, 2009
    Posts:
    225
    Possibly a different bug but related to recent editor versions having major perf issues. We just switched from 2020.3.12 to 2020.3.26f1 and have noticed two major perf issues in the editor.
    1 : pressing a key while playing causes a huge perf spike in editor, about 130ms where before it caused a minor spike of around 1ms. we reproed the issue in a new empty project and saw a spike of about 4ms. Of note, its while pressing any key while playing, not just keys used in our game. Our game is near unplayable in editor now... :( Profiler says its something in unity editor code, but its tanking the main thread so the game is tanking too.
    2 : randomly while playing in editor, the perf from the first frame will be horrible, about 80ms. Profiler says its the editor (gui refresh issue) not the game. Stop and play again, perf is fine at about 15ms. We didnt see this issue in the previous version of the editor.
     
  9. Pheck

    Pheck

    Joined:
    Jul 9, 2009
    Posts:
    225
    We filed a bug on the button press item. The other one doesnt have a solid repro so its hard to file a clean project bug for it.