18

Everything worked perfect on Xcode 9. But after updating to Xcode 10, Simulator started to get huge lags. Super simple animation is working on 2 fps and whole Mac OS is super slow while animation on Simulator is working. Anybody know what happens and how to fix that? Any app or any standard iOS app is the same terrible slow.

Explanation — it is NOT about slow motion that I can switch with Command⌘ + T. I am talking about huge lags. When UIView is flying it appears in another position jerkily. Not smooth slow animation. 2 fps is not slow motion. It is the same fast motion but in 2 FPS!

bodich
  • 1,708
  • 12
  • 31

7 Answers7

4

download iOS11.4 simulator and try it. The downside is you cannot test iOS12. But at least you can work on Xcode 10 and get the App released. Note: don’t bother to get Xcode 9.4.1. Or other versions. It won’t fix the problem. The trick is after you run Xcode 10 the first time, it installed the new coresimulator framework to your root folder.

Paul
  • 1,180
  • 11
  • 21
  • 1
    Hey Paul. Thank you for suggestion. But unfortunately 11.4 Simulator has the same trouble as 12.0 Simulator now. I think the point might be in new Xcode((( – bodich Sep 21 '18 at 06:19
  • I just tried. you are right. same problem. Some developer are saying after they roll back ~/Library/Developer/PrivateFrameworks/CoreSimulator.framework using Time Machine, they fixed the problem. I didn't have this option because I didn't backup my machine. Next Step will be reinstall the MacBook. – Paul Sep 21 '18 at 12:33
  • This is what I did too and has defiantly sped things up drematically. Came here hoping for a better solution though :-( Hopefully Apple will patch soon. – James Trickey Sep 21 '18 at 13:29
  • 1
    Are you running macOS Mojave (Version 10.14 Beta) by any chance? I'm running into the same problem and it is killing my productivity. Haven't found a fix for any of this yet but I'm scouring different forums and will post a working solution should I find one @Paul –  Sep 23 '18 at 20:57
  • No, I am running the latest maxOS. – Paul Sep 24 '18 at 19:26
  • I didn't download 11.4 simulator - it was installed yet before XCode 10, but switching to this simulator is definitely a relief for me - works tens times faster, than 12.0 simulator. MacOS 10.14 (release), XCode 10.0 – Nick Entin Oct 01 '18 at 07:34
  • Hi Nick, can you give more details about what you did? Did you just upgrade to Xcode 10 from xCode 9.4.1 and you can still select 11.4 simulator to run? Thanks – Paul Oct 01 '18 at 19:23
  • For me old simulators are just s bit faster. Not the solution definitely when I had super smooth animations before with over 60 fps. I am running on iPhone for now. – bodich Oct 22 '18 at 06:28
  • Hi Paul. You can select “Add simulator” if I remember correct (or maybe Manage Simulators) from simulator selection dropdown list. – bodich Oct 22 '18 at 06:32
  • I just switched to an iPhone 7 simulator instead of the XR that shows up with new projects and my problem was resolved. – Adrian Nov 22 '18 at 00:36
  • The IPhone 7 simulator is the only one that works half decently. – Arlen Beiler Apr 19 '19 at 02:52
3

What worked for me was switching the values in Debug > Graphics Quality Override of the Simulator menu. Surprisingly, after setting to 'Low' from 'Device Default', lag was gone, and now any value works like a charm.

vova.andr
  • 41
  • 3
2

I had same problem and this fixed it:

defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint X  

Where X is:

0 = auto

1 = Metal

2 = OpenCL

3 = OpenGL

hbdev
  • 52
  • 6
1

I had the exact same problem as described here after upgrading to XCode10. Every time I opened the simulator, no matter if it was a IphoneX or Iphone SE, my mac crawled to almost a stop and the simulator performed with a couple of FPS.

The following did not work:

  • FramebufferRendererHint settings
  • Reset simulators
  • Reinstall xcode
  • Created new users
  • Delete Xcode 10 and install XCode9
  • Delete CoreSimulator.framework and install new simulators

What finally worked:

  • Revert CoreSimulator.framework and Xcode.app using Time Machine(my last backup was from september 2017, so now im running Xcode9.1, but at least its working again(!))

Not sure if its relevant, but im working on a old IMac mid 2011.

AndreasW
  • 106
  • 3
0

I had troubles when switching from landscape to portrait. views would just not move.

The only work around I found was Command + Arrow up. This simulates a volume up press, but also refreshes the display after the rotation

0

Yes, it is NOT about slow motion as you said. Xcode simulator has extremely low performance in global. It is Apple's bug. I have reported it via Feedback Assistant. I have created demo with code demonstrating that simulator is 200 times slower than any old real device. I have found that JavaScript code with Date object executed in WKWebView is pain for simulator. See jsfiddle https://jsfiddle.net/kjms16cw/ I hope Apple will fix it soon!

var log = document.getElementById("log");
document.getElementById("button").onclick = function() { run(); };

function run() {
 var d1 = new Date();
 for (var i = 0; i < 1000; i++) {
  var x = new Date();
  x.setMilliseconds(0);
  x.setSeconds(0);
  x.setMinutes(0);
 }
 var d2 = new Date();
 log.innerHTML = ((d2.getTime() - d1.getTime()) / 1000) + " seconds";
}
<h3>Xcode Simulator Extremely Low Performance</h3>
<p>This test runs fast (several tens milliseconds e.g. 30 ms)
in any browser any device any platform including very old iOS device
e.g. iPhone 5C and several years old iPad 2, BUT IN SIMULATOR IT TAKES 6000 ms 
(yes, 6 seconds!). Terrible!</p>
<button id="button">run()</button>
<div id="log"></div>
mikep
  • 5,880
  • 2
  • 30
  • 37
-5

Make sure "Slow Animations" (Debug > Slow Animations) is not accidentally enabled. I've done it so many times :(

Quinton Wall
  • 178
  • 1
  • 2
  • 1
    He has explained that it has nothing to do with that. – matt Oct 15 '18 at 14:19
  • 1
    Right, very right. that solved my problem even though I have no idea how it was turned on. Might be set default in recent xCode – Aproram Nov 03 '18 at 00:37