gpt4 book ai didi

Iphone Simulator - 与设备相比分配太多内存并且运行缓慢

转载 作者:行者123 更新时间:2023-12-01 18:32:11 25 4
gpt4 key购买 nike

我看过很多关于模拟器运行缓慢的帖子,但我的问题是不同的。

我用仪器运行我的应用程序,发现在设备中,当应用程序运行时,应用程序使用了大约 8mb 的实时内存。在模拟器中,实时内存约为 50MB,我不知道这是为什么。

这会导致模拟器滞后,我需要它平稳运行,这样我才能为我的应用程序拍摄漂亮的屏幕截图。

有任何想法吗?

最佳答案

OpenGL ES 1.1/2.0 管道中有许多步骤在模拟器上运行时是在软件中完成的(因为 Mac GPU 是普通的 OpenGL),但在设备上运行时是硬件加速的(因此它实际上在设备)。

从文档中:

Important: Rendering performance of OpenGL ES in Simulator has no relation to the performance of OpenGL ES on an actual device. Simulator provides an optimized software rasterizer that takes advantage of the vector processing capabilities of your Macintosh computer. As a result, your OpenGL ES code may run faster or slower in iOS simulator (depending on your computer and what you are drawing) than on an actual device. Always profile and optimize your drawing code on a real device and never assume that Simulator reflects real-world performance.



这肯定解释了速度差异,也可能解释了在模拟器中运行时占用的额外内存。

关于Iphone Simulator - 与设备相比分配太多内存并且运行缓慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7705374/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com