iphone simulator suddenly started running very slo

2019-01-12 17:50发布

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.

12条回答
成全新的幸福
2楼-- · 2019-01-12 17:53

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.

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-12 17:55

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.

查看更多
再贱就再见
4楼-- · 2019-01-12 17:58

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

查看更多
一纸荒年 Trace。
5楼-- · 2019-01-12 18:00

Select Simulator,

Select Debug and uncheck slow animation.
shortcut command + t

That's work for me.

查看更多
Evening l夕情丶
6楼-- · 2019-01-12 18:01

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.

查看更多
迷人小祖宗
7楼-- · 2019-01-12 18:02

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.

查看更多
登录 后发表回答