Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Sudden Slow Editor/Build Performance OSX 10.9.5 ...Fine on other systems?

Discussion in 'macOS' started by lunoland, Apr 4, 2018.

  1. lunoland

    lunoland

    Joined:
    Aug 4, 2016
    Posts:
    12
    Hey all,

    I've searched high and low and tried many possible solutions to no avail. This problem is really disrupting work on my project, so I'm posting here. Apologies if this isn't the right forum. So what's up?

    Issue
    As of two weeks ago, without any significant change to my system/project, the Unity player performance tanked on my 2011 iMac (running OSX 10.9.5). My project runs at ~12* FPS, down from 60, in editor/builds. The editor seems OK, it's just the player!

    *All the editor and build FPS numbers I'm sharing are from the game code. I just count frames in an update loop and then report/reset that count once per second. The trend in the Unity stats overlay is the same though.


    Information
    1. Prior to the change I hadn't touched anything in the game that should have affected performance (I was working on adding sprites for a new enemy). Reverting my project to commits from well before I noticed this change has no effect.

    2. The profiler shows editor overhead responsible for >95% of frame time! Rendering is next at ~2%.

    3. The same project, in the same version of Unity (as of this post I'm on 2017.4.0f1) runs just fine at ~40 FPS on my 2015 macbook air (running OSX 10.10.5) in editor and in builds.

    4. Furthermore, I have a Windows 8 partition on the iMac that runs the same version of Unity and the same project at ~60 FPS in editor and in builds.

    5. Builds created on the Windows partition or on the macbook air still run at ~12 FPS on the iMac's OSX partition.

    6. Other similar Unity games I have in my steam library seem to run fine on the iMac (I tried Crawl specifically, although it's possible it's just significantly more performant than my project).


    What I've tried already
    Things that help temporarily:
    • Occasionally when I reboot and reset SMC + PRAM things get better, but eventually everything reverts.

    • Reducing the resolution of the player window improves the performance. Keeping it minimized also improves the performance (normally the opposite is true as maximizing tends to reduce editor overhead)

    • Removing the 2 render textures I use in the game also helps. With just a single camera and no render textures, performance is ~30 FPS with a small player window (not really acceptable, but maybe a clue).

    Things that haven't helped:
    • Reverting to an earlier version of the project before I noticed the slow down.

    • Profiling system resources to see if there is some other runaway application. Nothing obvious. Out of paranoia I reinstalled some stuff and removed a bunch of crufty apps and temp files, but to no avail.

    • Running Unity with various permutations of -force-opengl, -force-glcoreXY, and -force-clamped options.

    • Reinstalling Unity and getting a fresh clone of the project folder from my remote. Also tried different versions (I was on 5.4.1f1 when I first noticed this issue. I've tried 5.4.2f2, and have now migrated to 2017.4.0f1)

    • Reinstalling Mac OSX

    The next thing I'm considering is trying to upgrade to high sierra el capitan, but I'm a bit worried a few key pieces of software I need may stop functioning, namely photoshop CS4 (not the worst thing, can just get CC but meh). Seems like something OpenGL-related may be the issue?

    I would like to avoid working in Windows if possible. Any suggestions?
     
    Last edited: Apr 5, 2018
  2. lunoland

    lunoland

    Joined:
    Aug 4, 2016
    Posts:
    12
    Update: I also tried switching the graphics API on the Windows partition to glcore - performance was ~30fps down from 60fps with directx, but I didn't see the incredibly low frame rate and editor overhead in the profiler that I'm getting on the mac partition.

    This seems to rule out hardware and graphics API problems, so maybe it's OSX after all, but I'm not sure what would have changed over the last few weeks. I'm sort of at the edge of my knowledge here, so I could be totally off base.

    Attached some screenshots of the stats overlay and profiler windows with game running in an almost completely empty scene.
     

    Attached Files:

    Last edited: Apr 5, 2018
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't have much to offer at this point except moral support... I've been using Unity on my Macs (until recently, a rather old 2011 MacBook Pro), and have never seen this kind of performance problem.

    But then I'm not running version 2017 yet... I'm still on 5.6.3p2 (I know, I know...). Have you tried an older version of Unity, just to see if this is some recent bug?
     
  4. lunoland

    lunoland

    Joined:
    Aug 4, 2016
    Posts:
    12
    Yeah I'd never had any issues before either. I was on 5.4.1f1 for a long time when I first noticed this problem. I also tried 5.4.2f2. So yea, no luck with earlier versions either :\
     
  5. lunoland

    lunoland

    Joined:
    Aug 4, 2016
    Posts:
    12
    Alright, updating the OS to Sierra seems to have resolved the issue. Hooray.

    We'll see though, I've rebooted before and thought it was fixed only to see the lag return a few hours later. If I don't respond to this thread then we'll call it solved.

    I discovered that the El Capitan upgrade is only available for a few older versions. Although it's not obvious, you can still get Sierra here https://support.apple.com/en-us/HT208202

    CS4 still works in this version. Seems like a better solution for anyone who has a similar issue since it sounds like High Sierra isn't really stable yet. Whatever.
     
  6. lunoland

    lunoland

    Joined:
    Aug 4, 2016
    Posts:
    12
    Alright, the issue is back. It seem that it returns any time the computer sleeps between uses? If I reboot and reset PRAM, it's back to 60 fps, but after that it's only a while before Unity starts chugging again.

    Really don't want to buy a new computer, no idea why this happens.
     
    Last edited: Apr 9, 2018
  7. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    You could delete sections one by one until you find the culprit.
     
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You might take it to an Apple store and see if they can diagnose the problem.

    You might also try running of an external hard drive for a while, and see if the problem occurs there.
     
  9. jasonwaltersxyz

    jasonwaltersxyz

    Joined:
    Jul 16, 2014
    Posts:
    24
    I'm experiencing a similar scenario... Last night I created a brand new project with just a cube and my FPS dropped to <10. Metal is on. OS is updated to latest. Using Unity 2018.1.2f1. Macbook Pro 2014.

    Previously in 2017 I was not experiencing these issues and was actually surprised at how well Unity ran under Metal.
     
  10. vadersb_ru

    vadersb_ru

    Joined:
    Jul 5, 2017
    Posts:
    15
    Same issue here, 95% editor overhead in simple scene and everything is very laggy in the editor. When I move an object in scene view, it's like 5-10 fps.
    Mac Pro 2013, High Sierra
    Unity 2018.1.2f1

    @lunoland hey, any success in fixing these performance issues?