我的 iOS 应用程序在 iOS 5 上运行速度非常慢,这可能是什么原因?
好的,我有一个简单的阅读器应用程序,我在商店里已经有一段时间了,它运行得很好。我有一个 sqlite 内容数据库,我使用 fmdb 与之对话。我加载文本并将其显示在 UIWebView 中。很简单的东西。
当 iOS 5 上线时,我开始收到有关应用程序运行不正常的电子邮件。果然,它运行速度非常慢。我有一个 UISegmentedControl 来在章节之间切换,它实际上会在执行任何操作之前将 UI 冻结 10 秒。还有一些其他情况也属于这种情况。
到底是怎么回事?该应用程序在技术上仍然可以工作,但速度太慢以至于无法使用。还有其他人看过这个吗?有人对可能发生的事情有任何想法吗?
Ok, I have a simple reader app that I've had on the store for a while, and it works great. I have a sqlite db of content and I use fmdb to talk to it. I load up my text and display it in a UIWebView. Pretty simple stuff.
When iOS 5 went live, I started getting emails about the app not running right. Sure enough, it is running VERY slow. I have a UISegmentedControl to toggle between chapters, it literally freezes the UI for 10 seconds before it does anything. There are a few other instances where this is the case.
What is going on? The app still works technically, but it is just so slow it is unusable. Has anyone else seen this? Does anybody have any ideas as to what might be going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在 Instruments 下运行您的应用程序,并让它告诉您程序大部分时间都花在哪里。时间采样工具应该为您提供给定运行中消耗最多样本的方法的详细信息。
You should run your application under Instruments and let it tell where the program is spending most of its time. The time sampling tool should give you breakdown of the methods which are consuming the most number of samples for a given run.