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 then a quater of its original speed.
If the Cmd-T (slow animations) option doesn't work for you and
Debug -> Slow Animations
is off but you still have slow animations trySimulator -> Reset Contents and Settings
(or possiblyHardware -> 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.
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
.I think you pressed command + T instead of command + R by mistake.
Select Simulator,
Select Debug and uncheck slow animation.
shortcut command + t
That's work for me.
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.
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.