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
-
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.
-
The profiler shows editor overhead responsible for >95% of frame time! Rendering is next at ~2%.
-
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.
-
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.
-
Builds created on the Windows partition or on the macbook air still run at ~12 FPS on the iMac’s OSX partition.
-
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?