开发中的 iPhone 应用程序是否比发布后运行速度更慢?
我是开发 iPhone 应用程序的新手,并且一直在模拟器和我的第二代 iPod 上进行测试。我在我认为简单的代码中看到了滞后时间。我知道模拟器总是比硬件运行得更快,而且我知道当我调试时,物理 iPod 必须在后台运行调试程序,这可能会影响性能。我的问题是,调试后,当我在 iPod 上运行该应用程序时,它看起来仍然很慢。我的程序处于初级阶段,非常小,只有大约 1000 行代码,而且我知道我释放了我创建的所有对象。该程序从一开始就有点缓慢,所以我不认为这是内存泄漏问题。
正在开发的应用程序通常运行速度是否比最终确定和发布时慢,或者我现在正在使用的应用程序的总体速度是否将向公众发布?任何见解将不胜感激。感谢您抽出时间。
I am new to developing iPhone apps and have been testing on on the simulator and on my 2nd gen iPod. I am seeing lag times in what I believe is simple code. I know that the simulator will always run faster than the hardware, and I know that when I'm debugging, that the physical iPod has to run the debugging program in the background which could affect performance. My question is that after debugging, when I run the app on my iPod, it still seems sluggish. My program is in the beginning stages and is pretty small, only about 1000 lines of code and I know I release all of the objects I create. The program is a bit sluggish from the start so I don't think it's a memory leak issue.
Do apps that are in development generally runs slower than once they are finalized and released or is what I am working with now the general speed of the app that will be released to the public? Any insight would be appreciated. Thank you for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好吧,优化的“发布”构建配置显然比“调试”构建风格运行得更快。如果您的代码执行大量计算,则差异可能会非常大。如果您只做 UI 工作,您可能不会发现任何区别。
您的开发人员计算机上的发布版本与您从商店获得的应用程序之间没有区别。
Well, the optimized "Release" build configuration obviously runs faster than the "Debug" build style. The difference can be very big if your code does a lot of computation. If you are only doing UI stuff, you'll probably see no difference.
There’s no difference between the Release build on your developer machine and the app you get from the store.
几乎是一样的。您可以为生产做一些事情,例如关闭 NSLogs 和其他优化,但您可能不会看到人类可测量的差异。
It is pretty much the same. You can do things for production like turning off NSLogs and other optimizations, but you probably won't see a human-measurable difference.
正如其他人所说,设备上优化的“发布”构建将以与发布时完全相同的速度运行。
使用 Instruments 分析您的应用程序并准确了解导致速度放缓的原因。
As others have said, the optimized "Release" build on a device will run at exactly the same speed as when it is released.
Use Instruments to profile your application and see exactly what is causing the slowdown.