简体   繁体   English

iPad Pro模拟器+ cocos在Macbook Air 4 GB RAM上极其缓慢

[英]iPad Pro simulator + cocos extremely slow on Macbook Air 4 GB RAM

iPad Pro simulators are so slow that they become practically useless when running my cocos2dx game. iPad Pro模拟器太慢,以至于在运行我的cocos2dx游戏时它们几乎变得无用。 Theoretical FPS displayed is 60, but all animations take minutes instead of seconds (eg 30 seconds instead of a fraction of a second). 理论上显示的FPS是60,但是所有动画都用几分钟而不是几秒钟(例如,用30秒而不是几分之一秒)。

I made sure 100 times that Slow Animations are turned off on my simulator. 我确保在模拟器上关闭慢速动画100次。

I've found this topic: iOS Simulator games run very slow (low fps) where the reasons for possible poor simulator performance are explained, but: 我发现了这个主题: iOS模拟器游戏的运行速度非常慢(低fps) ,其中解释了可能导致模拟器性能不佳的原因,但是:

  • First, I can't deduce HOW slow their simulators are (they complain about bad FPS, my theoretical fps is good (???)). 首先,我无法推断出他们的模拟器的运行速度有多慢(他们抱怨FPS不好,理论上的fps不错(???))。 I'm getting the impression that they are able to test something while I am not 我给人的印象是,他们可以测试某些东西,而我却不能
  • Second, I need a solution to this problem as I need to test my stuff on an ipad pro 12.9 inch and I don't have the funds to buy one for tests now :) . 其次,我需要解决此问题的方法,因为我需要在12.9英寸的iPad Pro上测试我的东西,而我现在没有足够的资金购买测试用的东西:)。 However, I am thinking on getting a better macbook. 但是,我正在考虑购买更好的Macbook。

I am using Macbook Air 2014 with 4GB RAM. 我正在使用具有4GB RAM的Macbook Air 2014。 Do you think this might be the reason? 您认为这可能是原因吗? Can anyone tell me whether they are using ipad pro simulators when testing their games (Cocos, Unity, SpriteKit?), and if you get decent speed, then what are your Mac specs that might affect performance (processor, RAM?) 谁能告诉我他们在测试游戏(Cocos,Unity,SpriteKit?)时是否在使用ipad pro模拟器?如果速度不错,那么可能会影响性能的Mac规格(处理器,RAM?)

The simulator is not a device and it's performance varies depending on the machine you're running it on, but also the type of device you're simulating. 模拟器不是设备,它的性能取决于运行它的计算机,还取决于您要模拟的设备的类型。

The iPad Pro devices are both large and have a retina display. iPad Pro设备既大又具有视网膜显示屏。 The simulator has to process 2732 x 2048 (12.9" 5.6M pixels) and 2048 x 1536 (9.7" 3M pixels). 模拟器必须处理2732 x 2048(12.9英寸560万像素)和2048 x 1536(9.7英寸3M像素)。 The iPhone 6/6plus and later models have similarly high pixel counts. iPhone 6 / 6plus和更高型号的像素数也差不多。 This takes a lot of CPU+GPU power to render all those pixels. 这需要大量的CPU + GPU功能来渲染所有这些像素。

Your Macbook Air is decent, but it's screen has a much smaller resolution than the simulator and its GPU was chosen with its smaller screen-size in mind. Macbook Air不错,但是它的屏幕分辨率比模拟器要小得多,并且选择GPU时要考虑到较小的屏幕尺寸。 The integrated intel graphics aren't that performant. 集成的英特尔图形并不是那种性能。

If you can test out running the same game/app as a Mac application instead you should see better performance. 如果您可以测试运行与Mac应用程序相同的游戏/应用程序,则应该会看到更好的性能。

My advice: 我的建议:

  • Use 30fps during daily testing (or when in debug mode) director->setAnimationInterval(1.f/30.f); 在日常测试期间(或在调试模式下),请使用30fps director->setAnimationInterval(1.f/30.f); , if your game requires 60fps for its gameplay then you may want to look into other options. ,如果您的游戏需要60fps的播放速度,那么您可能需要研究其他选项。
  • You can also add one of the non-retina iPad simulators for testing. 您还可以添加一种非视网膜iPad模拟器进行测试。 iPad Mini or iPad 2. Test on the Pro simulators periodically only to check for any positioning/scaling issues. iPad Mini或iPad2。定期在Pro模拟器上进行测试,仅检查是否存在任何定位/缩放问题。
  • Render to a small(er) frame buffer and then render the frame buffer scaled up into the final screen buffer. 渲染到较小的帧缓冲区,然后渲染按比例放大到最终屏幕缓冲区的帧缓冲区。

It is always recommended to get an actual device when doing mobile development as the simulators/emulators don't provide real world performance characteristics. 始终建议您在进行移动开发时获得实际的设备,因为模拟器无法提供真实的性能特征。

Even though it's not what you're asking I'd still repeat the key point in the linked answer: Only worry about performance when running on an actual device, and find a way to not have it affect. 即使不是您要的内容,我仍然会重复链接的答案中的要点:只担心在实际设备上运行时的性能,并找到一种不会对其产生影响的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM