Xcode Simulator animations extremely slow when played in editor

后端 未结 9 1514
情深已故
情深已故 2020-12-22 20:18

Recently I have experienced, that Xcode\'s simulator has become extremely slow. Also if I create a new app and run it i, the transition between the launch screen and the fir

相关标签:
9条回答
  • 2020-12-22 21:04

    Currently only iOS11 simulator is slow.

    You can download additional iOS10 simulator which works perfectly.

    Choose Xcode -> Product -> Destination -> Download simulators... Then select any iOS10 simulator from the list (e.g. 10.3.1).

    After that you will choose iOS version for most devices:

    0 讨论(0)
  • 2020-12-22 21:04

    Xcode simulator has extremely low performance. 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/

    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>

    0 讨论(0)
  • 2020-12-22 21:17

    I believe this is an issue with El Capitan, not necessarily Xcode 7 or iOS 9. https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-9.0/index.html

    0 讨论(0)
提交回复
热议问题