iPhone Simulator suddenly started running very slow

IosMacosIos SimulatorOsx Mountain-Lion

Ios Problem Overview


I have been working on an app in iphone simulator for a number of weeks and it has been running well up until now, but all of a sudden has begun running very slow both when loading content and animations. I have not made any changes to my code since I last tested it successfully.

I tried restarting the simulator (multiple times) and removing the app and doing a completely clean rebuild, but no luck. I also checked my cpu usage through the monitor while the simulator is running and I am only using about 30% of my cpu and 40% of memory.

I fully understand that the simulator is never a quick as the device itself, but it seems strange that it has suddenly started running slow after such a long time, and by slow I mean less than a quarter of its original speed.

Ios Solutions


Solution 1 - Ios

In the iOS simulator, at the bar on the top, click on DebugToggle Slow Animations (or Slow Animations with Xcode 10+). Chances are you accidentally toggled it on.

Solution 2 - Ios

Simple Command + T will fix this problem.

Command + T toggles the simulator's Slow Animations, which can be found under the Simulator Menu: Debug -> Slow Animations.

Solution 3 - Ios

Go to the simulator's Debug menu and select "Toggle Slow Animations".

Update: In Xcode 10, it's just "Slow Animations":

Simulator Debug menu

Solution 4 - Ios

Select Simulator,

Select Debug and uncheck slow animation.
shortcut command + t

That's work for me.

Solution 5 - Ios

If the Cmd-T (slow animations) option doesn't work for you and Debug -> Slow Animations is off but you still have slow animations try Simulator -> Reset Contents and Settings (or possibly Hardware -> Erase All Content and Settings). That worked for me when none of the other answers in here did. Anyone have a suggestion as to why?

Also having a debugger attached (at all) may make the animations very slow.

Solution 6 - Ios

Another potential fix for React-Native users:

Chrome de-prioritizes Javascript running in any tabs not in the foreground. So if you have enabled remote debugging, be sure to put the debugger in its own window.

Solution 7 - Ios

You accidentally pressed the slow animation on debug when using simulator. So Run Simulator -> Debug -> Uncheck Slow Animation.

Solution 8 - Ios

I think you pressed command + T instead of command + R by mistake.

Solution 9 - Ios

I don't have the rep yet to leave a comment, but I upvoted some answers here and wanted to say more. I had a problem with slow animations in the iOS Simulator, especially on rotation, and I found this post via Google. Indeed, somehow "Toggle Slow Animations" must have been on, because three shifts fixed it. At first, I didn't think this was a problem because there's no checkmark next to "Toggle Slow Animations." It turns out there's never a checkmark, or any indication from the menu whether it's on or off. So just try toggling it and see if the rotation/navigation is faster/slower.

So, thank you!

Solution 10 - Ios

Simulator -> Reset contents and settings works for me. The issue seems to reappear when I debug my react-native code remotely. It could also be to do with AsyncStorage as nomad suggested.

Solution 11 - Ios

It is NOT only about slow animations. 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. Changing options in simulator does not help in my case. See jsfiddle https://jsfiddle.net/kjms16cw/ I hope Apple will fix it soon!

<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!

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";
}

Solution 12 - Ios

You can try to turn off remote debugging (Cmd-D -> Stop Remote JS Debugging). That usually speed things up.

Solution 13 - Ios

When the chrome debug is active and the browser tab is not in the foreground, the emulator is slow too. For me, I decided to put the guide in the foreground.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFinglishView Question on Stackoverflow
Solution 1 - IosMetabbleView Answer on Stackoverflow
Solution 2 - IosTyler HackView Answer on Stackoverflow
Solution 3 - IosCalebView Answer on Stackoverflow
Solution 4 - IosUrvish ModiView Answer on Stackoverflow
Solution 5 - IosjcollumView Answer on Stackoverflow
Solution 6 - IosBrandonView Answer on Stackoverflow
Solution 7 - IosDigvijay RajputView Answer on Stackoverflow
Solution 8 - IosSaad Ur RehmanView Answer on Stackoverflow
Solution 9 - IosGeoff HomView Answer on Stackoverflow
Solution 10 - IossmmacaView Answer on Stackoverflow
Solution 11 - IosmikepView Answer on Stackoverflow
Solution 12 - IosHeinrischView Answer on Stackoverflow
Solution 13 - IosJosimarView Answer on Stackoverflow